From 510ddeb156924f005338090878121266584fd744 Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Thu, 22 Aug 2024 12:38:34 +0200 Subject: [PATCH] EVM/Node: remove duplicated check Evm_state already checks if the block is the successor, it's its responsibility to return a valid Apply_success. --- etherlink/bin_node/lib_dev/evm_context.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/etherlink/bin_node/lib_dev/evm_context.ml b/etherlink/bin_node/lib_dev/evm_context.ml index afae5da0b785..41fd47a3c53f 100644 --- a/etherlink/bin_node/lib_dev/evm_context.ml +++ b/etherlink/bin_node/lib_dev/evm_context.ml @@ -643,8 +643,7 @@ module State = struct level = Qty blueprint_number; block_hash = current_block_hash; number_of_transactions; - } - when Z.equal blueprint_number next -> + } -> Metrics.set_block ~time_processed:!time_processed ~transactions:number_of_transactions ; @@ -686,7 +685,6 @@ module State = struct current_block_hash, kernel_upgrade, delayed_transactions ) - | Apply_success _ (* Produced a block, but not of the expected height *) | Apply_failure (* Did not produce a block *) -> let*! () = Blueprint_events.invalid_blueprint_produced next in tzfail (Cannot_apply_blueprint {local_state_level = Z.pred next}) -- GitLab