mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[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:
parent
65cbb6655b
commit
2373965551
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user