remove pointer from AtomicSwap

This commit is contained in:
Federico Kunze 2020-04-06 18:45:46 -04:00
parent 66c73362c8
commit 71d862300d
No known key found for this signature in database
GPG Key ID: 655F93A970080A30

View File

@ -14,7 +14,7 @@ import (
func DecodeStore(cdc *codec.Codec, kvA, kvB cmn.KVPair) string { func DecodeStore(cdc *codec.Codec, kvA, kvB cmn.KVPair) string {
switch { switch {
case bytes.Equal(kvA.Key[:1], types.AtomicSwapKeyPrefix): case bytes.Equal(kvA.Key[:1], types.AtomicSwapKeyPrefix):
var swapA, swapB *types.AtomicSwap var swapA, swapB types.AtomicSwap
cdc.MustUnmarshalBinaryLengthPrefixed(kvA.Value, &swapA) cdc.MustUnmarshalBinaryLengthPrefixed(kvA.Value, &swapA)
cdc.MustUnmarshalBinaryLengthPrefixed(kvB.Value, &swapB) cdc.MustUnmarshalBinaryLengthPrefixed(kvB.Value, &swapB)
return fmt.Sprintf("%v\n%v", swapA, swapB) return fmt.Sprintf("%v\n%v", swapA, swapB)