Catch up with amino 0.13.0 (#2690)

* catch up with amino changes in
https://github.com/tendermint/go-amino/pull/222

* WIP: update to amino v0.13.0

* update to fixed amino release
This commit is contained in:
Ismail Khoffi
2018-10-25 03:34:01 +02:00
committed by Ethan Buchman
parent 9795e12ef2
commit 6643c5dd11
29 changed files with 117 additions and 117 deletions

View File

@ -46,7 +46,7 @@ func TestVoteSignable(t *testing.T) {
vote := examplePrecommit()
signBytes := vote.SignBytes("test_chain_id")
expected, err := cdc.MarshalBinary(CanonicalizeVote("test_chain_id", vote))
expected, err := cdc.MarshalBinaryLengthPrefixed(CanonicalizeVote("test_chain_id", vote))
require.NoError(t, err)
require.Equal(t, expected, signBytes, "Got unexpected sign bytes for Vote.")
@ -130,9 +130,9 @@ func TestVoteSignableTestVectors(t *testing.T) {
func TestVoteProposalNotEq(t *testing.T) {
cv := CanonicalizeVote("", &Vote{Height: 1, Round: 1})
p := CanonicalizeProposal("", &Proposal{Height: 1, Round: 1})
vb, err := cdc.MarshalBinary(cv)
vb, err := cdc.MarshalBinaryLengthPrefixed(cv)
require.NoError(t, err)
pb, err := cdc.MarshalBinary(p)
pb, err := cdc.MarshalBinaryLengthPrefixed(p)
require.NoError(t, err)
require.NotEqual(t, vb, pb)
}
@ -154,9 +154,9 @@ func TestVoteVerifySignature(t *testing.T) {
// serialize, deserialize and verify again....
precommit := new(Vote)
bs, err := cdc.MarshalBinary(vote)
bs, err := cdc.MarshalBinaryLengthPrefixed(vote)
require.NoError(t, err)
err = cdc.UnmarshalBinary(bs, &precommit)
err = cdc.UnmarshalBinaryLengthPrefixed(bs, &precommit)
require.NoError(t, err)
// verify the transmitted vote
@ -230,7 +230,7 @@ func TestMaxVoteBytes(t *testing.T) {
err := privVal.SignVote("test_chain_id", vote)
require.NoError(t, err)
bz, err := cdc.MarshalBinary(vote)
bz, err := cdc.MarshalBinaryLengthPrefixed(vote)
require.NoError(t, err)
assert.EqualValues(t, MaxVoteBytes, len(bz))