Skip to content

Commit

Permalink
use handle_result! macro
Browse files Browse the repository at this point in the history
following suggestion by @lorbax #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 26, 2024
1 parent 2241d82 commit f7cd687
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 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,7 @@ 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 +319,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 f7cd687

Please sign in to comment.