mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
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:
committed by
Ethan Buchman
parent
9795e12ef2
commit
6643c5dd11
@ -79,9 +79,9 @@ func TestValidTxProof(t *testing.T) {
|
||||
|
||||
// read-write must also work
|
||||
var p2 TxProof
|
||||
bin, err := cdc.MarshalBinary(proof)
|
||||
bin, err := cdc.MarshalBinaryLengthPrefixed(proof)
|
||||
assert.Nil(t, err)
|
||||
err = cdc.UnmarshalBinary(bin, &p2)
|
||||
err = cdc.UnmarshalBinaryLengthPrefixed(bin, &p2)
|
||||
if assert.Nil(t, err, "%d: %d: %+v", h, i, err) {
|
||||
assert.Nil(t, p2.Validate(root), "%d: %d", h, i)
|
||||
}
|
||||
@ -105,7 +105,7 @@ func testTxProofUnchangable(t *testing.T) {
|
||||
|
||||
// make sure it is valid to start with
|
||||
assert.Nil(t, proof.Validate(root))
|
||||
bin, err := cdc.MarshalBinary(proof)
|
||||
bin, err := cdc.MarshalBinaryLengthPrefixed(proof)
|
||||
assert.Nil(t, err)
|
||||
|
||||
// try mutating the data and make sure nothing breaks
|
||||
@ -120,7 +120,7 @@ func testTxProofUnchangable(t *testing.T) {
|
||||
// This makes sure that the proof doesn't deserialize into something valid.
|
||||
func assertBadProof(t *testing.T, root []byte, bad []byte, good TxProof) {
|
||||
var proof TxProof
|
||||
err := cdc.UnmarshalBinary(bad, &proof)
|
||||
err := cdc.UnmarshalBinaryLengthPrefixed(bad, &proof)
|
||||
if err == nil {
|
||||
err = proof.Validate(root)
|
||||
if err == nil {
|
||||
|
Reference in New Issue
Block a user