Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions proto/lumera/supernode/v1/supernode_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ enum SuperNodeState {
SUPERNODE_STATE_POSTPONED = 5 [(gogoproto.enumvalue_customname) = "SuperNodeStatePostponed"];
}

message SuperNodeStateRecord {
SuperNodeState state = 1 [(gogoproto.moretags) = "yaml:\"state\""];
int64 height = 2;
}
message SuperNodeStateRecord {
SuperNodeState state = 1 [(gogoproto.moretags) = "yaml:\"state\""];
int64 height = 2;
// reason is an optional string describing why the state transition occurred.
// It is currently set only for transitions into POSTPONED.
string reason = 3 [(gogoproto.moretags) = "yaml:\"reason\""];
}
2 changes: 1 addition & 1 deletion x/supernode/v1/keeper/metrics_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func markPostponed(ctx sdk.Context, keeper types.SupernodeKeeper, sn *types.Supe
if last.State == types.SuperNodeStatePostponed {
return nil
}
sn.States = append(sn.States, &types.SuperNodeStateRecord{State: types.SuperNodeStatePostponed, Height: ctx.BlockHeight()})
sn.States = append(sn.States, &types.SuperNodeStateRecord{State: types.SuperNodeStatePostponed, Height: ctx.BlockHeight(), Reason: reason})
if err := keeper.SetSuperNode(ctx, *sn); err != nil {
return err
}
Expand Down
110 changes: 82 additions & 28 deletions x/supernode/v1/types/supernode_state.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading