Skip to content

Commit

Permalink
get once
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Feb 23, 2024
1 parent b2f7373 commit 7ff4bd9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/staking/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ func (am AppModule) EndBlock(ctx context.Context) ([]appmodule.ValidatorUpdate,

validatorUpdates := make([]appmodule.ValidatorUpdate, len(cometValidatorUpdates))
for i, v := range cometValidatorUpdates {
if len(v.PubKey.GetEd25519()) > 0 {
if ed25519 := v.PubKey.GetEd25519(); len(ed25519) > 0 {
validatorUpdates[i] = appmodule.ValidatorUpdate{
PubKey: v.PubKey.GetEd25519(),
PubKey: ed25519,
PubKeyType: "ed25519",
Power: v.Power,
}
} else if len(v.PubKey.GetSecp256K1()) > 0 {
} else if secp256k1 := v.PubKey.GetSecp256K1(); len(secp256k1) > 0 {
validatorUpdates[i] = appmodule.ValidatorUpdate{
PubKey: v.PubKey.GetSecp256K1(),
PubKey: secp256k1,
PubKeyType: "secp256k1",
Power: v.Power,
}
Expand Down

0 comments on commit 7ff4bd9

Please sign in to comment.