From 10fad78914af371e9f46e7836e5742b94feeda16 Mon Sep 17 00:00:00 2001 From: tgmichel Date: Mon, 19 Oct 2020 15:29:20 +0200 Subject: [PATCH] Fix Decode response --- rpc/src/eth.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc/src/eth.rs b/rpc/src/eth.rs index 668b4175e8..7380f39ae3 100644 --- a/rpc/src/eth.rs +++ b/rpc/src/eth.rs @@ -261,7 +261,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentBlock") ) ) { - return Decode::decode(&mut &block_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &block_data.0[..]).unwrap()); } else { return None; }; } @@ -272,7 +272,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses") ) ) { - return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &status_data.0[..]).unwrap()); } else { return None; }; } @@ -283,7 +283,7 @@ impl EthApi where storage_prefix_build(b"Ethereum", b"CurrentReceipts") ) ) { - return Decode::decode(&mut &status_data.0[..]).unwrap_or_else(|_| None); + return Some(Decode::decode(&mut &status_data.0[..]).unwrap()); } else { return None; }; } }