Skip to content

Commit

Permalink
take first coinbase output before encoding - solo mining
Browse files Browse the repository at this point in the history
fmt
  • Loading branch information
GitGab19 committed Aug 16, 2024
1 parent d479f94 commit cd493ee
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions roles/jd-client/src/lib/template_receiver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,16 @@ impl TemplateRx {
test_only_do_not_send_solution_to_tp: bool,
) {
let mut encoded_outputs = vec![];
miner_coinbase_outputs
.consensus_encode(&mut encoded_outputs)
.expect("Invalid coinbase output in config");
// jd is set to None in initialize_jd_as_solo_miner (in this case we need to take the first output as done by JDS)
if jd.is_none() {
miner_coinbase_outputs[0]
.consensus_encode(&mut encoded_outputs)
.expect("Invalid coinbase output in config");
} else {
miner_coinbase_outputs
.consensus_encode(&mut encoded_outputs)
.expect("Invalid coinbase output in config");
}
let stream = tokio::net::TcpStream::connect(address).await.unwrap();

let initiator = match authority_public_key {
Expand Down

0 comments on commit cd493ee

Please sign in to comment.