rpc: fix blockheader marshalling in getblockheader RPC server

Problem: wrong json marshalling of `nextconsensus` field of
result.Header

Solution: change field type from util.uint160 to address string
This commit is contained in:
Anna Shaleva 2020-03-18 12:21:16 +03:00
parent 751e79d480
commit 79f7862496
2 changed files with 4 additions and 3 deletions

View file

@ -441,7 +441,7 @@ var rpcTestCases = map[string][]rpcTestCase{
Timestamp: header.Timestamp,
Index: header.Index,
Nonce: strconv.FormatUint(header.ConsensusData, 16),
NextConsensus: header.NextConsensus,
NextConsensus: address.Uint160ToString(header.NextConsensus),
Script: header.Script,
Confirmations: e.chain.BlockHeight() - header.Index + 1,
}