diff --git a/node/src/actors/chain_manager/handlers.rs b/node/src/actors/chain_manager/handlers.rs index b37a4e30a..19525b3e8 100644 --- a/node/src/actors/chain_manager/handlers.rs +++ b/node/src/actors/chain_manager/handlers.rs @@ -19,6 +19,7 @@ use witnet_data_structures::{ error::{ChainInfoError, TransactionError::DataRequestNotFound}, get_protocol_version, proto::versioning::ProtocolVersion, + refresh_protocol_version, staking::{errors::StakesError, prelude::StakeKey}, transaction::{ DRTransaction, StakeTransaction, Transaction, UnstakeTransaction, VTTransaction, @@ -138,6 +139,11 @@ impl Handler> for ChainManager { protocol.current_version = get_protocol_version(self.current_epoch); } + // Update the global protocol version state if necessary + if get_protocol_version(self.current_epoch) != get_protocol_version(None) { + refresh_protocol_version(current_epoch); + } + match self.sm_state { StateMachine::WaitingConsensus => { if let Some(chain_info) = &self.chain_state.chain_info {