Browse Source

(Squash this) switch to bare

pull/2164/head
ValarDragon 6 years ago
parent
commit
8d28344e84
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      crypto/multisig/threshold_multisig.go
  2. +1
    -1
      crypto/multisig/threshold_multisig_test.go

+ 1
- 1
crypto/multisig/threshold_multisig.go View File

@ -65,7 +65,7 @@ func (pk *ThresholdMultiSignaturePubKey) VerifyBytes(msg []byte, marshalledSig [
// Bytes returns the amino encoded version of the ThresholdMultiSignaturePubKey // Bytes returns the amino encoded version of the ThresholdMultiSignaturePubKey
func (pk *ThresholdMultiSignaturePubKey) Bytes() []byte { func (pk *ThresholdMultiSignaturePubKey) Bytes() []byte {
return cdc.MustMarshalBinary(pk)
return cdc.MustMarshalBinaryBare(pk)
} }
// Address returns tmhash(ThresholdMultiSignaturePubKey.Bytes()) // Address returns tmhash(ThresholdMultiSignaturePubKey.Bytes())


+ 1
- 1
crypto/multisig/threshold_multisig_test.go View File

@ -83,7 +83,7 @@ func TestMultiSigPubkeyEquality(t *testing.T) {
pubkeys, _ := generatePubKeysAndSignatures(5, msg) pubkeys, _ := generatePubKeysAndSignatures(5, msg)
multisigKey := NewThresholdMultiSignaturePubKey(2, pubkeys) multisigKey := NewThresholdMultiSignaturePubKey(2, pubkeys)
var unmarshalledMultisig *ThresholdMultiSignaturePubKey var unmarshalledMultisig *ThresholdMultiSignaturePubKey
cdc.MustUnmarshalBinary(multisigKey.Bytes(), &unmarshalledMultisig)
cdc.MustUnmarshalBinaryBare(multisigKey.Bytes(), &unmarshalledMultisig)
require.True(t, multisigKey.Equals(unmarshalledMultisig)) require.True(t, multisigKey.Equals(unmarshalledMultisig))
// Ensure that reordering pubkeys is treated as a different pubkey // Ensure that reordering pubkeys is treated as a different pubkey


Loading…
Cancel
Save