mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
[NOD-165] In getBlockVerboseResult and getBlockHeaderVerboseResult, renamed merkleRoot to HashMerkleRoot and added idMerkleRoot and acceptedIdMerkleRoot. (#294)
This commit is contained in:
parent
08d94c7a47
commit
dfd12cdaac
@ -15,7 +15,9 @@ type GetBlockHeaderVerboseResult struct {
|
||||
Height uint64 `json:"height"`
|
||||
Version int32 `json:"version"`
|
||||
VersionHex string `json:"versionHex"`
|
||||
MerkleRoot string `json:"merkleRoot"`
|
||||
HashMerkleRoot string `json:"hashMerkleRoot"`
|
||||
IDMerkleRoot string `json:"idMerkleRoot"`
|
||||
AcceptedIDMerkleRoot string `json:"acceptedIdMerkleRoot"`
|
||||
Time int64 `json:"time"`
|
||||
Nonce uint64 `json:"nonce"`
|
||||
Bits string `json:"bits"`
|
||||
@ -34,7 +36,9 @@ type GetBlockVerboseResult struct {
|
||||
Height uint64 `json:"height"`
|
||||
Version int32 `json:"version"`
|
||||
VersionHex string `json:"versionHex"`
|
||||
MerkleRoot string `json:"merkleRoot"`
|
||||
HashMerkleRoot string `json:"hashMerkleRoot"`
|
||||
IDMerkleRoot string `json:"idMerkleRoot"`
|
||||
AcceptedIDMerkleRoot string `json:"acceptedIdMerkleRoot"`
|
||||
Tx []string `json:"tx,omitempty"`
|
||||
RawTx []TxRawResult `json:"rawRx,omitempty"`
|
||||
Time int64 `json:"time"`
|
||||
|
@ -1197,7 +1197,9 @@ func handleGetBlock(s *Server, cmd interface{}, closeChan <-chan struct{}) (inte
|
||||
Hash: c.Hash,
|
||||
Version: blockHeader.Version,
|
||||
VersionHex: fmt.Sprintf("%08x", blockHeader.Version),
|
||||
MerkleRoot: blockHeader.HashMerkleRoot.String(),
|
||||
HashMerkleRoot: blockHeader.HashMerkleRoot.String(),
|
||||
IDMerkleRoot: blockHeader.IDMerkleRoot.String(),
|
||||
AcceptedIDMerkleRoot: blockHeader.AcceptedIDMerkleRoot.String(),
|
||||
ParentHashes: daghash.Strings(blockHeader.ParentHashes),
|
||||
Nonce: blockHeader.Nonce,
|
||||
Time: blockHeader.Timestamp.Unix(),
|
||||
@ -1398,7 +1400,9 @@ func handleGetBlockHeader(s *Server, cmd interface{}, closeChan <-chan struct{})
|
||||
Height: blockHeight,
|
||||
Version: blockHeader.Version,
|
||||
VersionHex: fmt.Sprintf("%08x", blockHeader.Version),
|
||||
MerkleRoot: blockHeader.HashMerkleRoot.String(),
|
||||
HashMerkleRoot: blockHeader.HashMerkleRoot.String(),
|
||||
IDMerkleRoot: blockHeader.IDMerkleRoot.String(),
|
||||
AcceptedIDMerkleRoot: blockHeader.AcceptedIDMerkleRoot.String(),
|
||||
NextHashes: nextHashStrings,
|
||||
ParentHashes: daghash.Strings(blockHeader.ParentHashes),
|
||||
Nonce: uint64(blockHeader.Nonce),
|
||||
|
@ -241,7 +241,9 @@ var helpDescsEnUS = map[string]string{
|
||||
"getBlockVerboseResult-height": "The height of the block in the block chain",
|
||||
"getBlockVerboseResult-version": "The block version",
|
||||
"getBlockVerboseResult-versionHex": "The block version in hexadecimal",
|
||||
"getBlockVerboseResult-merkleRoot": "Root hash of the merkle tree",
|
||||
"getBlockVerboseResult-hashMerkleRoot": "Merkle tree reference to hash of all transactions for the block",
|
||||
"getBlockVerboseResult-idMerkleRoot": "Merkle tree reference to hash of all transactions' IDs for the block",
|
||||
"getBlockVerboseResult-acceptedIdMerkleRoot": "Merkle tree reference to hash all transactions accepted form the block blues",
|
||||
"getBlockVerboseResult-tx": "The transaction hashes (only when verbosetx=false)",
|
||||
"getBlockVerboseResult-rawRx": "The transactions as JSON objects (only when verbosetx=true)",
|
||||
"getBlockVerboseResult-time": "The block time in seconds since 1 Jan 1970 GMT",
|
||||
@ -274,7 +276,9 @@ var helpDescsEnUS = map[string]string{
|
||||
"getBlockHeaderVerboseResult-height": "The height of the block in the block chain",
|
||||
"getBlockHeaderVerboseResult-version": "The block version",
|
||||
"getBlockHeaderVerboseResult-versionHex": "The block version in hexadecimal",
|
||||
"getBlockHeaderVerboseResult-merkleRoot": "Root hash of the merkle tree",
|
||||
"getBlockHeaderVerboseResult-hashMerkleRoot": "Merkle tree reference to hash of all transactions for the block",
|
||||
"getBlockHeaderVerboseResult-idMerkleRoot": "Merkle tree reference to hash of all transactions' IDs for the block",
|
||||
"getBlockHeaderVerboseResult-acceptedIdMerkleRoot": "Merkle tree reference to hash all transactions accepted form the block blues",
|
||||
"getBlockHeaderVerboseResult-time": "The block time in seconds since 1 Jan 1970 GMT",
|
||||
"getBlockHeaderVerboseResult-nonce": "The block nonce",
|
||||
"getBlockHeaderVerboseResult-bits": "The bits which represent the block difficulty",
|
||||
|
Loading…
x
Reference in New Issue
Block a user