[sync] fix rossetta test

pull/3973/head
Jacky Wang 3 years ago
parent f0103161ae
commit 1c37a17d3b
No known key found for this signature in database
GPG Key ID: 1085CE5F4FF5842C
  1. 6
      rosetta/services/network.go

@ -5,6 +5,8 @@ import (
"fmt" "fmt"
"math/big" "math/big"
"github.com/ethereum/go-ethereum/common/math"
"github.com/coinbase/rosetta-sdk-go/server" "github.com/coinbase/rosetta-sdk-go/server"
"github.com/coinbase/rosetta-sdk-go/types" "github.com/coinbase/rosetta-sdk-go/types"
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
@ -115,8 +117,10 @@ func (s *NetworkAPI) NetworkStatus(
} }
} }
} }
targetInt := int64(targetHeight) targetInt := int64(targetHeight)
if targetHeight == math.MaxInt64 {
targetInt = 0
}
currentIndex := currentHeader.Number().Int64() currentIndex := currentHeader.Number().Int64()
ss := &types.SyncStatus{ ss := &types.SyncStatus{
CurrentIndex: &currentIndex, CurrentIndex: &currentIndex,

Loading…
Cancel
Save