Skip to content

Commit

Permalink
emit event when sp status is forced updated
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgao001 committed Nov 3, 2023
1 parent 12abbd9 commit a90147b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/sp/keeper/sp_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func (k Keeper) ForceUpdateMaintenanceRecords(ctx sdk.Context) {
sp.Status = types.STATUS_IN_SERVICE
k.SetStorageProvider(ctx, sp)
changed = true
_ = ctx.EventManager().EmitTypedEvents(&types.EventUpdateStorageProviderStatus{
SpId: sp.Id,
SpAddress: sp.OperatorAddress,
PreStatus: types.STATUS_IN_MAINTENANCE.String(),
NewStatus: types.STATUS_IN_SERVICE.String(),
})
}
}
}
Expand Down

0 comments on commit a90147b

Please sign in to comment.