update to new (timestamp & empty structs) encoding in amino

- timestamps no longer have fixed length encoding
-
This commit is contained in:
Liamsi
2018-07-18 16:37:15 +02:00
parent 2744682e77
commit a81ca93139
3 changed files with 32 additions and 33 deletions

View File

@ -62,10 +62,6 @@ func TestProto3Compatibility(t *testing.T) {
Height: 150,
Time: &proto3.Timestamp{Seconds: seconds, Nanos: nanos},
NumTxs: 7,
// TODO(ismail): as Jae suggested, we'll add a flag to make this obsolete:
LastBlockID: &proto3.BlockID{
PartsHeader: &proto3.PartSetHeader{},
},
TotalTxs: 100,
LastCommitHash: []byte("commit hash"),
DataHash: []byte("data hash"),
@ -93,6 +89,9 @@ func TestProto3Compatibility(t *testing.T) {
pb, err = proto.Marshal(&proto3.Header{})
assert.NoError(t, err, "unexpected error")
t.Log(pb)
ab, err = cdc.MarshalBinaryBare(Header{})
assert.NoError(t, err, "unexpected error")
t.Log(ab)
pb, err = proto.Marshal(&proto3.Timestamp{})
assert.NoError(t, err, "unexpected error")