Skip to content

Commit

Permalink
fix(x/slashing): ValidatorSignInfo migration to collections was missi…
Browse files Browse the repository at this point in the history
…ng length prefix (#17127)
  • Loading branch information
facundomedica authored Jul 25, 2023
1 parent b0acf60 commit 974abde
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion x/slashing/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, storeServi
sb,
types.ValidatorSigningInfoKeyPrefix,
"validator_signing_info",
sdk.ConsAddressKey,
sdk.LengthPrefixedAddressKey(sdk.ConsAddressKey), // nolint: staticcheck // sdk.LengthPrefixedAddressKey is needed to retain state compatibility
codec.CollValue[types.ValidatorSigningInfo](cdc),
),
}
Expand Down
7 changes: 0 additions & 7 deletions x/slashing/types/signing_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package types
import (
"time"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand All @@ -21,9 +20,3 @@ func NewValidatorSigningInfo(
MissedBlocksCounter: missedBlocksCounter,
}
}

// UnmarshalValSigningInfo unmarshals a validator signing info from a store value
func UnmarshalValSigningInfo(cdc codec.Codec, value []byte) (signingInfo ValidatorSigningInfo, err error) {
err = cdc.Unmarshal(value, &signingInfo)
return signingInfo, err
}

0 comments on commit 974abde

Please sign in to comment.