[NOD-576] Rename NextHashes to ChildHashes in GetBlock/GetBlockHeaders rpc call (#645)

* [NOD-576] Rename NextHashes to ChildHashes in GetBlock/GetBlockHeaders rpc call

* [NOD-576] Fix typo
This commit is contained in:
Ori Newman 2020-02-27 17:34:38 +02:00 committed by GitHub
parent 65cbb6655b
commit 2373965551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ type GetBlockHeaderVerboseResult struct {
Difficulty float64 `json:"difficulty"`
ParentHashes []string `json:"parentHashes,omitempty"`
SelectedParentHash string `json:"selectedParentHash"`
NextHashes []string `json:"nextHashes,omitempty"`
ChildHashes []string `json:"childHashes,omitempty"`
}
// GetBlockVerboseResult models the data from the getblock command when the
@ -47,7 +47,7 @@ type GetBlockVerboseResult struct {
Difficulty float64 `json:"difficulty"`
ParentHashes []string `json:"parentHashes"`
SelectedParentHash string `json:"selectedParentHash,omitempty"`
NextHashes []string `json:"nextHashes,omitempty"`
ChildHashes []string `json:"childHashes,omitempty"`
}
// CreateMultiSigResult models the data returned from the createmultisig

View File

@ -264,7 +264,7 @@ func buildGetBlockVerboseResult(s *Server, block *util.Block, isVerboseTx bool)
Size: int32(block.MsgBlock().SerializeSize()),
Bits: strconv.FormatInt(int64(blockHeader.Bits), 16),
Difficulty: getDifficultyRatio(blockHeader.Bits, params),
NextHashes: childHashStrings,
ChildHashes: childHashStrings,
}
if isVerboseTx {

View File

@ -68,7 +68,7 @@ func handleGetBlockHeader(s *Server, cmd interface{}, closeChan <-chan struct{})
VersionHex: fmt.Sprintf("%08x", blockHeader.Version),
HashMerkleRoot: blockHeader.HashMerkleRoot.String(),
AcceptedIDMerkleRoot: blockHeader.AcceptedIDMerkleRoot.String(),
NextHashes: childHashStrings,
ChildHashes: childHashStrings,
ParentHashes: daghash.Strings(blockHeader.ParentHashes),
SelectedParentHash: selectedParentHash.String(),
Nonce: blockHeader.Nonce,

View File

@ -267,7 +267,7 @@ var helpDescsEnUS = map[string]string{
"getBlockVerboseResult-difficulty": "The proof-of-work difficulty as a multiple of the minimum difficulty",
"getBlockVerboseResult-parentHashes": "The hashes of the parent blocks",
"getBlockVerboseResult-selectedParentHash": "The selected parent hash",
"getBlockVerboseResult-nextHashes": "The hashes of the next blocks (only if there are any)",
"getBlockVerboseResult-childHashes": "The hashes of the child blocks (only if there are any)",
// GetBlockCountCmd help.
"getBlockCount--synopsis": "Returns the number of blocks in the block DAG.",
@ -295,7 +295,7 @@ var helpDescsEnUS = map[string]string{
"getBlockHeaderVerboseResult-difficulty": "The proof-of-work difficulty as a multiple of the minimum difficulty",
"getBlockHeaderVerboseResult-parentHashes": "The hashes of the parent blocks",
"getBlockHeaderVerboseResult-selectedParentHash": "The selected parent hash",
"getBlockHeaderVerboseResult-nextHashes": "The hashes of the next blocks (only if there are any)",
"getBlockHeaderVerboseResult-childHashes": "The hashes of the child blocks (only if there are any)",
// TemplateRequest help.
"templateRequest-mode": "This is 'template', 'proposal', or omitted",