From 21fc3f807ab5358e2255e89313c7f5dc3ebc8f54 Mon Sep 17 00:00:00 2001 From: plebhash Date: Wed, 11 Dec 2024 20:08:02 +0700 Subject: [PATCH] docs for job_creator module --- protocols/v2/roles-logic-sv2/src/job_creator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocols/v2/roles-logic-sv2/src/job_creator.rs b/protocols/v2/roles-logic-sv2/src/job_creator.rs index 31ef5f2246..0156f2119d 100644 --- a/protocols/v2/roles-logic-sv2/src/job_creator.rs +++ b/protocols/v2/roles-logic-sv2/src/job_creator.rs @@ -49,6 +49,7 @@ pub fn tx_outputs_to_costum_scripts(tx_outputs: &[u8]) -> Vec { } impl JobsCreators { + /// constructor pub fn new(extranonce_len: u8) -> Self { Self { lasts_new_template: Vec::new(), @@ -60,6 +61,7 @@ impl JobsCreators { } } + /// get template id from job pub fn get_template_id_from_job(&self, job_id: u32) -> Option { self.job_to_template_id.get(&job_id).map(|x| x - 1) } @@ -135,6 +137,7 @@ impl JobsCreators { } } +/// convert custom job into extended job pub fn extended_job_from_custom_job( referenced_job: &mining_sv2::SetCustomMiningJob, pool_signature: String,