From cbf4ec73fb99d3d712c67cdd8be53c3778e0fb91 Mon Sep 17 00:00:00 2001 From: ghassmo Date: Mon, 4 Oct 2021 09:14:43 +0300 Subject: [PATCH] Client: print error message come from state_transition function --- src/client.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/client.rs b/src/client.rs index 85780cff6..d4f06df47 100644 --- a/src/client.rs +++ b/src/client.rs @@ -272,7 +272,8 @@ impl Client { debug!(target: "CLIENT", "Starting build tx from slab"); let tx = tx::Transaction::decode(&slab.get_payload()[..]); - if tx.is_err() { + if let Err(e) = tx { + error!("TX: {}", e.to_string()); continue; } @@ -280,7 +281,8 @@ impl Client { let update = state_transition(&state, tx?); - if update.is_err() { + if let Err(e) = update { + error!("state transition: {}", e.to_string()); continue; } @@ -321,7 +323,8 @@ impl Client { let tx = tx::Transaction::decode(&slab.get_payload()[..]); - if tx.is_err() { + if let Err(e) = tx { + error!("TX: {}", e.to_string()); continue; } @@ -329,7 +332,8 @@ impl Client { let update = state_transition(&state, tx?); - if update.is_err() { + if let Err(e) = update { + error!("state transition: {}", e.to_string()); continue; }