Skip to content

Commit

Permalink
docs for job_creator module
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed Dec 11, 2024
1 parent 02ca199 commit 73b0561
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocols/v2/roles-logic-sv2/src/job_creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn tx_outputs_to_costum_scripts(tx_outputs: &[u8]) -> Vec<TxOut> {
}

impl JobsCreators {
/// constructor
pub fn new(extranonce_len: u8) -> Self {
Self {
lasts_new_template: Vec::new(),
Expand All @@ -60,6 +61,7 @@ impl JobsCreators {
}
}

/// get template id from job
pub fn get_template_id_from_job(&self, job_id: u32) -> Option<u64> {
self.job_to_template_id.get(&job_id).map(|x| x - 1)
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 73b0561

Please sign in to comment.