File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -723,15 +723,26 @@ impl Signer {
723
723
self . global_state_evaluator
724
724
. insert_update ( self . stacks_address , update) ;
725
725
} ;
726
- let latest_version = self
727
- . global_state_evaluator
728
- . determine_latest_supported_signer_protocol_version ( )
729
- . unwrap_or_else ( || {
726
+ let Some ( latest_version) = self
727
+ . global_state_evaluator
728
+ . determine_latest_supported_signer_protocol_version ( )
729
+ . or_else ( || {
730
+ // Don't default if we are in a global consensus activation state as its pointless
731
+ if SortitionStateVersion :: from_protocol_version ( local_version) . uses_global_state ( ) {
732
+ None
733
+ } else {
734
+ warn ! ( "{self}: No consensus on signer protocol version. Defaulting to local state version: {local_version}." ) ;
735
+ Some ( local_version)
736
+ }
737
+ } )
738
+ else {
730
739
warn ! (
731
- "{self}: No consensus on signer protocol version. Defaulting to local supported version: {local_version}"
740
+ "{self}: No consensus on signer protocol version. Unable to validate block. Rejecting." ;
741
+ "signer_signature_hash" => %block. header. signer_signature_hash( ) ,
742
+ "block_id" => %block. block_id( ) ,
732
743
) ;
733
- local_version
734
- } ) ;
744
+ return Some ( self . create_block_rejection ( RejectReason :: NoSignerConsensus , block ) ) ;
745
+ } ;
735
746
let state_version = SortitionStateVersion :: from_protocol_version ( latest_version) ;
736
747
if state_version. uses_global_state ( ) {
737
748
self . check_block_against_global_state ( stacks_client, block)
You can’t perform that action at this time.
0 commit comments