Skip to content

Commit

Permalink
Ser correct byte prefix for SlashLogKey (#786)
Browse files Browse the repository at this point in the history
fix SlashLogKey bug
  • Loading branch information
mpoke authored Mar 17, 2023
1 parent 4c318b4 commit 57d3b54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/ccv/provider/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,5 +446,5 @@ func ParseChainIdAndConsAddrKey(prefix byte, bz []byte) (string, sdk.ConsAddress

// SlashLogKey returns the key to a validator's slash log
func SlashLogKey(providerAddr ProviderConsAddress) []byte {
return append([]byte{SlashAcksBytePrefix}, providerAddr.ToSdkConsAddr().Bytes()...)
return append([]byte{SlashLogBytePrefix}, providerAddr.ToSdkConsAddr().Bytes()...)
}
1 change: 1 addition & 0 deletions x/ccv/provider/types/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func getSingleByteKeys() [][]byte {
keys[i], i = []byte{providertypes.ThrottledPacketDataSizeBytePrefix}, i+1
keys[i], i = []byte{providertypes.ThrottledPacketDataBytePrefix}, i+1
keys[i], i = []byte{providertypes.GlobalSlashEntryBytePrefix}, i+1
keys[i], i = []byte{providertypes.SlashLogBytePrefix}, i+1

return keys[:i]
}
Expand Down

0 comments on commit 57d3b54

Please sign in to comment.