File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ SignerAgreementStateChangeReason {
35
35
ProtocolUpgrade ( "protocol_upgrade" ) ,
36
36
/// An update related to the Miner view
37
37
MinerViewUpdate ( "miner_view_update" ) ,
38
+ /// A specific Miner View update related to the parent tenure
39
+ MinerParentTenureUpdate ( "miner_parent_tenure_update" ) ,
38
40
} ) ;
39
41
40
42
define_named_enum ! (
Original file line number Diff line number Diff line change @@ -833,6 +833,27 @@ impl LocalStateMachine {
833
833
crate :: monitoring:: actions:: increment_signer_agreement_state_change_reason (
834
834
crate :: monitoring:: SignerAgreementStateChangeReason :: MinerViewUpdate ,
835
835
) ;
836
+ #[ cfg( feature = "monitoring_prom" ) ]
837
+ match ( & current_miner, & new_miner) {
838
+ (
839
+ StateMachineUpdateMinerState :: ActiveMiner {
840
+ parent_tenure_id : current_parent_tenure,
841
+ ..
842
+ } ,
843
+ StateMachineUpdateMinerState :: ActiveMiner {
844
+ parent_tenure_id : new_parent_tenure,
845
+ ..
846
+ } ,
847
+ ) => {
848
+ if current_parent_tenure != new_parent_tenure {
849
+ crate :: monitoring:: actions:: increment_signer_agreement_state_change_reason (
850
+ crate :: monitoring:: SignerAgreementStateChangeReason :: MinerParentTenureUpdate ,
851
+ ) ;
852
+ }
853
+ }
854
+ _ => { }
855
+ }
856
+
836
857
* self = Self :: Initialized ( SignerStateMachine {
837
858
burn_block,
838
859
burn_block_height,
You can’t perform that action at this time.
0 commit comments