Bugfix: RPC/Mining: Fix up GBT docs #19395

pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:bugfix_gbt_help changing 1 files +8 −7
  1. luke-jr commented at 1:01 pm on June 27, 2020: member
    • Clarify rules, capabilities, coinbaseaux, coinbasetxn
    • Specify name of ’transactions’ key

    Clean merge to 0.20

  2. in src/rpc/mining.cpp:396 in ab915ffea0 outdated
    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, "", ""},
    


    MarcoFalke commented at 1:33 pm on June 27, 2020:
    Is elision still needed?

    luke-jr commented at 1:42 pm on June 27, 2020:
    Why wouldn’t it be? There’s an undefined number of key/value pairs.

    MarcoFalke commented at 2:01 pm on June 27, 2020:

    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

     0diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
     1index 9200ac3bf7..560c46a13c 100644
     2--- a/src/rpc/mining.cpp
     3+++ b/src/rpc/mining.cpp
     4@@ -542,10 +542,9 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
     5                                         {RPCResult::Type::NUM, "weight", "total transaction weight, as counted for purposes of block limits"},
     6                                     }},
     7                             }},
     8-                        {RPCResult::Type::OBJ, "coinbaseaux", "data that should be included in the coinbase's scriptSig content",
     9+                        {RPCResult::Type::OBJ_DYN, "coinbaseaux", "data that should be included in the coinbase's scriptSig content",
    10                         {
    11                             {RPCResult::Type::STR_HEX, "str", "values must be in the coinbase (keys may be ignored)"},
    12-                            {RPCResult::Type::ELISION, "", ""},
    13                         }},
    14                         {RPCResult::Type::NUM, "coinbasevalue", "maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis)"},
    15                         {RPCResult::Type::OBJ, "coinbasetxn", "information for coinbase transaction (in same format as elements of 'transactions' above)",
    

    MarcoFalke commented at 2:05 pm on June 27, 2020:
    I introduced this bug, but since you are touching the lines here, might as well fix it

    luke-jr commented at 6:42 pm on June 28, 2020:
    Fixed
  3. MarcoFalke commented at 1:33 pm on June 27, 2020: member
    ACK ab915ffea0936d722bfe94aeb3169668d0905584
  4. DrahtBot added the label Mining on Jun 27, 2020
  5. DrahtBot added the label RPC/REST/ZMQ on Jun 27, 2020
  6. Bugfix: RPC/Mining: Fix up GBT docs
    - Clarify rules, capabilities, coinbaseaux, coinbasetxn
    - Specify name of 'transactions' key
    8b9546cca2
  7. luke-jr force-pushed on Jun 28, 2020
  8. DrahtBot commented at 8:58 pm on August 2, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19646 (doc: Updated outdated help command for getblocktemplate by jakeleventhal)

    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.

  9. luke-jr commented at 6:54 pm on August 9, 2020: member
    Superceded by #19646
  10. luke-jr closed this on Aug 9, 2020

  11. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me