From 8d28344e84714ccac00f5876dae344b8d76e458b Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Fri, 10 Aug 2018 13:42:23 -0500 Subject: [PATCH] (Squash this) switch to bare --- crypto/multisig/threshold_multisig.go | 2 +- crypto/multisig/threshold_multisig_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/multisig/threshold_multisig.go b/crypto/multisig/threshold_multisig.go index 934f7d798..01462d6fb 100644 --- a/crypto/multisig/threshold_multisig.go +++ b/crypto/multisig/threshold_multisig.go @@ -65,7 +65,7 @@ func (pk *ThresholdMultiSignaturePubKey) VerifyBytes(msg []byte, marshalledSig [ // Bytes returns the amino encoded version of the ThresholdMultiSignaturePubKey func (pk *ThresholdMultiSignaturePubKey) Bytes() []byte { - return cdc.MustMarshalBinary(pk) + return cdc.MustMarshalBinaryBare(pk) } // Address returns tmhash(ThresholdMultiSignaturePubKey.Bytes()) diff --git a/crypto/multisig/threshold_multisig_test.go b/crypto/multisig/threshold_multisig_test.go index 6036554a3..2d2fdeec8 100644 --- a/crypto/multisig/threshold_multisig_test.go +++ b/crypto/multisig/threshold_multisig_test.go @@ -83,7 +83,7 @@ func TestMultiSigPubkeyEquality(t *testing.T) { pubkeys, _ := generatePubKeysAndSignatures(5, msg) multisigKey := NewThresholdMultiSignaturePubKey(2, pubkeys) var unmarshalledMultisig *ThresholdMultiSignaturePubKey - cdc.MustUnmarshalBinary(multisigKey.Bytes(), &unmarshalledMultisig) + cdc.MustUnmarshalBinaryBare(multisigKey.Bytes(), &unmarshalledMultisig) require.True(t, multisigKey.Equals(unmarshalledMultisig)) // Ensure that reordering pubkeys is treated as a different pubkey