@@ -2,7 +2,6 @@ package services
22
33import (
44 "context"
5- "encoding/hex"
65 "encoding/json"
76
87 "github.com/coinbase/rosetta-sdk-go/server"
@@ -79,7 +78,7 @@ func (s *networkAPIService) NetworkStatus(
7978
8079 var genesisBlockIdentifierHash string
8180 if len (status .Consensus .GenesisHash ) > 0 {
82- genesisBlockIdentifierHash = hex . EncodeToString ( status .Consensus .GenesisHash )
81+ genesisBlockIdentifierHash = status .Consensus .GenesisHash . Hex ( )
8382 } else {
8483 // If the block is pruned, fill in a dummy value so that users can still get
8584 // other network status instead of erroring out completely.
@@ -90,14 +89,14 @@ func (s *networkAPIService) NetworkStatus(
9089 if len (status .Consensus .LastRetainedHash ) > 0 {
9190 oldestBlockIdentifier = & types.BlockIdentifier {
9291 Index : status .Consensus .LastRetainedHeight ,
93- Hash : hex . EncodeToString ( status .Consensus .LastRetainedHash ),
92+ Hash : status .Consensus .LastRetainedHash . Hex ( ),
9493 }
9594 }
9695
9796 resp := & types.NetworkStatusResponse {
9897 CurrentBlockIdentifier : & types.BlockIdentifier {
9998 Index : status .Consensus .LatestHeight ,
100- Hash : hex . EncodeToString ( status .Consensus .LatestHash ),
99+ Hash : status .Consensus .LatestHash . Hex ( ),
101100 },
102101 CurrentBlockTimestamp : status .Consensus .LatestTime .UnixNano () / 1000000 , // ms
103102 GenesisBlockIdentifier : & types.BlockIdentifier {
0 commit comments