rpc: Add testblocktemplatevalidity #13415

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1806-rpcTestblocktemplatevalidity changing 2 files +50 −3
  1. MarcoFalke commented at 6:55 pm on June 7, 2018: member
    A caller can check if a block template is valid and is good to spend work on
  2. MarcoFalke commented at 6:56 pm on June 7, 2018: member
    TODO: Add tests (Currently left out to avoid excessive merge conflicts with other pull requests touching the miner tests)
  3. MarcoFalke added the label RPC/REST/ZMQ on Jun 7, 2018
  4. MarcoFalke added the label Mining on Jun 7, 2018
  5. DrahtBot commented at 7:31 pm on June 7, 2018: member
    • #13945 (Refactoring CRPCCommand with enum category by isghe)
    • #13864 (validation: Document where we are intentionally ignoring bool return values from validation related functions by practicalswift)
    • #13083 (Add compile time checking for cs_main runtime locking assertions by practicalswift)

    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.

  6. in src/rpc/mining.cpp:300 in fa040362cb outdated
    295+    UniValue result(UniValue::VOBJ);
    296+    result.pushKV("block_hash", block.GetHash().GetHex());
    297+    CValidationState state;
    298+    bool valid_template = TestBlockValidity(state, Params(), block, /* pindexPrev */ tip, /* fCheckPOW */ false, /* fCheckMerkleRoot */ true);
    299+    result.pushKV("valid_template", valid_template);
    300+    if (valid_template) {
    


    Empact commented at 9:14 pm on June 7, 2018:
    Is this inverted?
  7. luke-jr commented at 9:18 pm on June 7, 2018: member
    This is already supported via BIP 23 Block Proposals: https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki#Block_Proposal
  8. promag commented at 11:29 am on June 10, 2018: member
  9. MarcoFalke force-pushed on Jun 15, 2018
  10. MarcoFalke force-pushed on Jul 11, 2018
  11. laanwj added this to the milestone 0.18.0 on Aug 2, 2018
  12. laanwj added the label Feature on Aug 2, 2018
  13. rpc: Add testblocktemplatevalidity 28057de21a
  14. MarcoFalke force-pushed on Aug 15, 2018
  15. MarcoFalke closed this on Aug 15, 2018

  16. MarcoFalke deleted the branch on Aug 15, 2018
  17. DrahtBot locked this on Sep 8, 2021

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-12-03 15:12 UTC

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