Skip to content

Commit

Permalink
Added more fields to node update details event
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrinivas8687 committed Oct 18, 2023
1 parent f4d20db commit 5f5c161
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 28 deletions.
6 changes: 5 additions & 1 deletion proto/sentinel/node/v2/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ message EventRegister {
}

message EventUpdateDetails {
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
string gigabyte_prices = 2
[ (gogoproto.moretags) = "yaml:\"gigabyte_prices\"" ];
string hourly_prices = 3 [ (gogoproto.moretags) = "yaml:\"hourly_prices\"" ];
string remote_url = 4 [ (gogoproto.customname) = "RemoteURL" ];
}

message EventUpdateStatus {
Expand Down
4 changes: 3 additions & 1 deletion x/node/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (k *Keeper) EndBlock(ctx sdk.Context) []abcitypes.ValidatorUpdate {
k.SetNode(ctx, item)
ctx.EventManager().EmitTypedEvent(
&types.EventUpdateDetails{
Address: item.Address,
Address: item.Address,
GigabytePrices: item.GigabytePrices.String(),
HourlyPrices: item.HourlyPrices.String(),
},
)

Expand Down
190 changes: 164 additions & 26 deletions x/node/types/events.pb.go

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

0 comments on commit 5f5c161

Please sign in to comment.