File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
node/src/actors/chain_manager Expand file tree Collapse file tree 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 {
134134 // The best candidate must be cleared on every epoch
135135 let best_candidate = self . best_candidate . take ( ) ;
136136
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 ) ;
138139 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 ;
140141 }
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 {
144145 refresh_protocol_version ( current_epoch) ;
145146 }
146147
You can’t perform that action at this time.
0 commit comments