From 99fa7f8132366c2c42f941c9886151cd97622a7a Mon Sep 17 00:00:00 2001 From: Liamsi Date: Wed, 13 Jun 2018 00:43:06 -0700 Subject: [PATCH] everything works with https://github.com/tendermint/go-amino/pull/178 --- types/proto3/block.proto | 4 ++-- types/proto3_test.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/types/proto3/block.proto b/types/proto3/block.proto index d1c5cb928..771bc828b 100644 --- a/types/proto3/block.proto +++ b/types/proto3/block.proto @@ -39,6 +39,6 @@ message Header { } message Timestamp { - sint64 seconds = 1; - sint32 nanos = 2; + sfixed64 seconds = 1; + sfixed32 nanos = 2; } diff --git a/types/proto3_test.go b/types/proto3_test.go index 244551fe2..bffe1cf75 100644 --- a/types/proto3_test.go +++ b/types/proto3_test.go @@ -12,11 +12,12 @@ func TestProto3Compatibility(t *testing.T) { // TODO(ismail): table tests instead... tm, err := time.Parse("Mon Jan 2 15:04:05 -0700 MST 2006", "Mon Jan 2 15:04:05 -0700 MST 2006") assert.NoError(t, err) - + seconds := tm.Unix() + nanos := int32(tm.Nanosecond()) pbHeader := proto3.Header{ ChainID: "cosmos", Height:150, - Time: &proto3.Timestamp{Seconds:tm.Unix(), Nanos:int32(tm.Nanosecond())}, + Time: &proto3.Timestamp{Seconds:seconds, Nanos:nanos}, NumTxs: 7, LastBlockID: &proto3.BlockID{ Hash: []byte("some serious hashing"),