[sync] fix rossetta test

pull/3990/head
Jacky Wang 3 years ago committed by Leo Chen
parent 3a4eaa55df
commit da863cffac
No known key found for this signature in database
GPG Key ID: 9A0417092EBC5E96
  1. 6
      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: &currentIndex,

Loading…
Cancel
Save