diff --git a/node/src/chain/consensus.rs b/node/src/chain/consensus.rs index 13727e393..e4e6eee57 100644 --- a/node/src/chain/consensus.rs +++ b/node/src/chain/consensus.rs @@ -10,7 +10,9 @@ use std::time::Duration; use async_trait::async_trait; use dusk_consensus::commons::{RoundUpdate, TimeoutSet}; use dusk_consensus::consensus::Consensus; -use dusk_consensus::errors::{ConsensusError, HeaderError, OperationError}; +use dusk_consensus::errors::{ + ConsensusError, HeaderError, OperationError, VstError, +}; use dusk_consensus::operations::{ CallParams, Operations, Output, VerificationOutput, Voter, }; @@ -318,13 +320,12 @@ impl Operations for Executor { prev_root: [u8; 32], blk: &Block, voters: &[Voter], - ) -> Result { + ) -> Result { info!("verifying state"); let vm = self.vm.read().await; vm.verify_state_transition(prev_root, blk, voters) - .map_err(OperationError::InvalidVST) } async fn execute_state_transition( diff --git a/node/src/vm.rs b/node/src/vm.rs index f43899a82..c999335d1 100644 --- a/node/src/vm.rs +++ b/node/src/vm.rs @@ -4,6 +4,7 @@ // // Copyright (c) DUSK NETWORK. All rights reserved. +use dusk_consensus::errors::VstError; use dusk_consensus::operations::{CallParams, VerificationOutput, Voter}; use dusk_consensus::user::provisioners::Provisioners; use dusk_consensus::user::stake::Stake; @@ -32,7 +33,7 @@ pub trait VMExecution: Send + Sync + 'static { prev_root: [u8; 32], blk: &Block, voters: &[Voter], - ) -> anyhow::Result; + ) -> Result; fn accept( &self,