- Clarify rules, capabilities, coinbaseaux, coinbasetxn
- Specify name of 'transactions' key
Clean merge to 0.20
Clean merge to 0.20
391 | @@ -391,10 +392,11 @@ static UniValue getblocktemplate(const JSONRPCRequest& request) 392 | }}, 393 | {RPCResult::Type::OBJ, "coinbaseaux", "data that should be included in the coinbase's scriptSig content", 394 | { 395 | + {RPCResult::Type::STR_HEX, "str", "values must be in the coinbase (keys may be ignored)"}, 396 | {RPCResult::Type::ELISION, "", ""},
Is elision still needed?
Why wouldn't it be? There's an undefined number of key/value pairs.
Then it should use the proper type OBJ_DYN. Elision is used to omit documentation (e.g to avoid redundancy). It shouldn't be used as a workaround to change the structure of the rpc result in the doc
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 9200ac3bf7..560c46a13c 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -542,10 +542,9 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
{RPCResult::Type::NUM, "weight", "total transaction weight, as counted for purposes of block limits"},
}},
}},
- {RPCResult::Type::OBJ, "coinbaseaux", "data that should be included in the coinbase's scriptSig content",
+ {RPCResult::Type::OBJ_DYN, "coinbaseaux", "data that should be included in the coinbase's scriptSig content",
{
{RPCResult::Type::STR_HEX, "str", "values must be in the coinbase (keys may be ignored)"},
- {RPCResult::Type::ELISION, "", ""},
}},
{RPCResult::Type::NUM, "coinbasevalue", "maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)"},
{RPCResult::Type::OBJ, "coinbasetxn", "information for coinbase transaction (in same format as elements of 'transactions' above)",
I introduced this bug, but since you are touching the lines here, might as well fix it
Fixed
ACK ab915ffea0936d722bfe94aeb3169668d0905584
- Clarify rules, capabilities, coinbaseaux, coinbasetxn
- Specify name of 'transactions' key
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.