From 407ddf204bc4db6f120e8a02f0c29d80aa659c6e Mon Sep 17 00:00:00 2001 From: Jouzo <15011228+Jouzo@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:55:02 +0200 Subject: [PATCH] Fix suggested_priority_fee crashing before EVM activation (#2360) --- lib/ain-evm/src/block.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ain-evm/src/block.rs b/lib/ain-evm/src/block.rs index 144b8cc186..0a2e804a8f 100644 --- a/lib/ain-evm/src/block.rs +++ b/lib/ain-evm/src/block.rs @@ -265,7 +265,8 @@ impl BlockService { let block = self .storage .get_latest_block()? - .expect("Unable to find latest block"); + .ok_or(format_err!("Unable to find latest block"))?; + blocks.push(block.clone()); let mut parent_hash = block.header.parent_hash;