Skip to content

Commit

Permalink
Merge pull request #780 from GitGab19/fix-jds-block-propagation
Browse files Browse the repository at this point in the history
JDS block construction and propagation fix
  • Loading branch information
GitGab19 committed Mar 4, 2024
2 parents 85f8697 + 632f284 commit 74b3c49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/v2/roles-logic-sv2/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ impl<'a> From<BlockCreator<'a>> for bitcoin::Block {

let prev_blockhash = u256_to_block_hash(message.prev_hash.into_static());
let header = stratum_common::bitcoin::blockdata::block::BlockHeader {
version: last_declare.version as i32,
version: message.version as i32,
prev_blockhash,
merkle_root,
time: message.ntime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub struct SubmitSolutionJd<'decoder> {
pub ntime: u32,
pub nonce: u32,
pub nbits: u32,
pub version: u32,
}

#[cfg(feature = "with_serde")]
Expand Down
1 change: 1 addition & 0 deletions roles/jd-client/src/lib/job_declarator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ impl JobDeclarator {
ntime: solution.ntime,
nonce: solution.nonce,
nbits: prev_hash.n_bits,
version: solution.version,
};
let frame: StdFrame =
PoolMessages::JobDeclaration(JobDeclaration::SubmitSolution(solution))
Expand Down

0 comments on commit 74b3c49

Please sign in to comment.