Skip to content

Commit

Permalink
use handle_result! macro
Browse files Browse the repository at this point in the history
following suggestion by @lorbax stratum-mining#1025 (comment)

the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here
  • Loading branch information
plebhash committed Jul 24, 2024
1 parent 5440147 commit 1d33e46
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions roles/jd-server/src/lib/job_declarator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ impl JobDeclaratorDownstream {
new_block_sender.send(hexdata).await;
}
Err(e) => {
error!(
"Received solution but encountered error: {:?}",
e
);
handle_result!(
tx_status,
Err(*e)
)
}
};
}
Expand Down Expand Up @@ -322,9 +322,9 @@ impl JobDeclaratorDownstream {
let _ = new_block_sender.send(hexdata).await;
},
Err(e) => {
error!(
"Error retrieving transactions: {:?}",
e
handle_result!(
tx_status,
Err(*e)
);
}
};
Expand Down

0 comments on commit 1d33e46

Please sign in to comment.