From da863cffac44477b53ad078ab68f31d4563395b0 Mon Sep 17 00:00:00 2001 From: Jacky Wang Date: Thu, 6 Jan 2022 18:29:29 -0800 Subject: [PATCH] [sync] fix rossetta test --- rosetta/services/network.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rosetta/services/network.go b/rosetta/services/network.go index 825e47fe6..15faf490f 100644 --- a/rosetta/services/network.go +++ b/rosetta/services/network.go @@ -5,6 +5,8 @@ import ( "fmt" "math/big" + "github.com/ethereum/go-ethereum/common/math" + "github.com/coinbase/rosetta-sdk-go/server" "github.com/coinbase/rosetta-sdk-go/types" "github.com/ethereum/go-ethereum/rpc" @@ -115,8 +117,10 @@ func (s *NetworkAPI) NetworkStatus( } } } - targetInt := int64(targetHeight) + if targetHeight == math.MaxInt64 { + targetInt = 0 + } currentIndex := currentHeader.Number().Int64() ss := &types.SyncStatus{ CurrentIndex: ¤tIndex,