From 1d33e462dc5ca7090d95945cfe9e21229285453f Mon Sep 17 00:00:00 2001 From: plebhash Date: Wed, 24 Jul 2024 13:15:46 -0400 Subject: [PATCH] use handle_result! macro following suggestion by @lorbax https://github.com/stratum-mining/stratum/pull/1025#issuecomment-2245767959 the implementation diverged a bit from the suggestion, but it was still a good reminder that we should leverage `handle_result!` macro here --- roles/jd-server/src/lib/job_declarator/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/jd-server/src/lib/job_declarator/mod.rs b/roles/jd-server/src/lib/job_declarator/mod.rs index 4e4dad99c2..da37999ac4 100644 --- a/roles/jd-server/src/lib/job_declarator/mod.rs +++ b/roles/jd-server/src/lib/job_declarator/mod.rs @@ -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) + ) } }; } @@ -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) ); } };