rpcserver: convert verbose confirmations fields to int64
This commit is contained in:
parent
f696d49c49
commit
85cb8f50a0
1 changed files with 2 additions and 2 deletions
|
@ -1126,7 +1126,7 @@ func handleGetBlock(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (i
|
||||||
PreviousHash: blockHeader.PrevBlock.String(),
|
PreviousHash: blockHeader.PrevBlock.String(),
|
||||||
Nonce: blockHeader.Nonce,
|
Nonce: blockHeader.Nonce,
|
||||||
Time: blockHeader.Timestamp.Unix(),
|
Time: blockHeader.Timestamp.Unix(),
|
||||||
Confirmations: uint64(1 + best.Height - blockHeight),
|
Confirmations: int64(1 + best.Height - blockHeight),
|
||||||
Height: int64(blockHeight),
|
Height: int64(blockHeight),
|
||||||
Size: int32(len(blkBytes)),
|
Size: int32(len(blkBytes)),
|
||||||
StrippedSize: int32(blk.MsgBlock().SerializeSizeStripped()),
|
StrippedSize: int32(blk.MsgBlock().SerializeSizeStripped()),
|
||||||
|
@ -1364,7 +1364,7 @@ func handleGetBlockHeader(s *rpcServer, cmd interface{}, closeChan <-chan struct
|
||||||
params := s.cfg.ChainParams
|
params := s.cfg.ChainParams
|
||||||
blockHeaderReply := btcjson.GetBlockHeaderVerboseResult{
|
blockHeaderReply := btcjson.GetBlockHeaderVerboseResult{
|
||||||
Hash: c.Hash,
|
Hash: c.Hash,
|
||||||
Confirmations: uint64(1 + best.Height - blockHeight),
|
Confirmations: int64(1 + best.Height - blockHeight),
|
||||||
Height: blockHeight,
|
Height: blockHeight,
|
||||||
Version: blockHeader.Version,
|
Version: blockHeader.Version,
|
||||||
VersionHex: fmt.Sprintf("%08x", blockHeader.Version),
|
VersionHex: fmt.Sprintf("%08x", blockHeader.Version),
|
||||||
|
|
Loading…
Reference in a new issue