File tree 1 file changed +6
-5
lines changed
node/src/actors/chain_manager
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -134,13 +134,14 @@ impl Handler<EpochNotification<EveryEpochPayload>> for ChainManager {
134
134
// The best candidate must be cleared on every epoch
135
135
let best_candidate = self . best_candidate . take ( ) ;
136
136
137
- // Make sure that the protocol info in the chain state is kept up to date
137
+ // Make sure that the protocol version in the chain state is kept up to date
138
+ let expected_protocol_version = get_protocol_version ( self . current_epoch ) ;
138
139
if let Some ( ChainInfo { protocol, .. } ) = & mut self . chain_state . chain_info {
139
- protocol. current_version = get_protocol_version ( self . current_epoch ) ;
140
+ protocol. current_version = expected_protocol_version ;
140
141
}
141
-
142
- // Update the global protocol version state if necessary
143
- if get_protocol_version ( self . current_epoch ) != get_protocol_version ( None ) {
142
+ // Also update the global protocol version state if necessary
143
+ let current_protocol_version = get_protocol_version ( None ) ;
144
+ if expected_protocol_version != current_protocol_version {
144
145
refresh_protocol_version ( current_epoch) ;
145
146
}
146
147
You can’t perform that action at this time.
0 commit comments