forked from TrueCloudLab/neoneo-go
rpc: add 0x
prefix to the getbestblockhash answer
For consistency with C# nodes that do add it to their answers.
This commit is contained in:
parent
54bb9b94c7
commit
70e4529848
2 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,7 @@ Methods:
|
|||
switch req.Method {
|
||||
case "getbestblockhash":
|
||||
getbestblockhashCalled.Inc()
|
||||
results = s.chain.CurrentBlockHash().ReverseString()
|
||||
results = "0x" + s.chain.CurrentBlockHash().ReverseString()
|
||||
|
||||
case "getblock":
|
||||
getbestblockCalled.Inc()
|
||||
|
|
|
@ -28,7 +28,7 @@ func TestRPC(t *testing.T) {
|
|||
var res StringResultResponse
|
||||
err := json.Unmarshal(bytes.TrimSpace(body), &res)
|
||||
assert.NoErrorf(t, err, "could not parse response: %s", body)
|
||||
assert.Equal(t, chain.CurrentBlockHash().ReverseString(), res.Result)
|
||||
assert.Equal(t, "0x"+chain.CurrentBlockHash().ReverseString(), res.Result)
|
||||
})
|
||||
|
||||
t.Run("getblock", func(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue