Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs #6061

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:consensus_inputs changing 2 files +28 −9
  1. jtimon commented at 12:21 PM on April 25, 2015: contributor

    A simple refactor as preparation for moving consensus to code for transaction validation.

    Consensus shouldn't depend on std::vector<CScriptCheck> *pvChecks.

    This is part of #6051 but can be merged independently.

  2. jtimon cross-referenced this on Apr 25, 2015 from issue MOVEONLY: Consensus: Move most of consensus functions (pre-block) by jtimon
  3. sipa commented at 2:41 PM on April 28, 2015: member

    Code change looks good to me, but why is CheckInputs not consensus, while CheckTxInputs is?

  4. jtimon commented at 6:04 PM on April 28, 2015: contributor

    CheckInputs uses the CScriptCheck class which consensus doesn't need. I later plan to create Consensus::CheckTxInputsScripts that does the remaining and it's used directly instead of CheckInputs in some places (in miner and AcceptToMemPool, but not in AcceptBlock). The following branch is outdated, but you can get an idea here https://github.com/jtimon/bitcoin/commit/ddd505a4f62603d6b2ed07e0fecb213b81c8f795

  5. laanwj added the label Improvement on May 12, 2015
  6. Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs eb837199a0
  7. in src/main.h:None in 69f64fe585 outdated
     506 | @@ -507,4 +507,10 @@ extern CCoinsViewCache *pcoinsTip;
     507 |  /** Global variable that points to the active block tree (protected by cs_main) */
     508 |  extern CBlockTreeDB *pblocktree;
     509 |  
     510 | +/** 
     511 | + * While checking, GetBestBlock() refers to the parent block. (protected by cs_main)
    


    laanwj commented at 8:47 AM on June 10, 2015:

    This comment does not actually describe what the function does :)


    jtimon commented at 12:06 PM on June 10, 2015:

    Yeah, I just moved the comments from the cpp instead of moving the implementation of the new function. I've just added a line to the doc. Should I leave the rest here or move it back to the implementation?

  8. jtimon force-pushed on Jun 10, 2015
  9. jtimon commented at 12:16 PM on June 10, 2015: contributor

    By the way, @laanwj (or anyone) feel free to propose additional edits to GetSpendHeight's documentation.

  10. laanwj merged this on Jun 10, 2015
  11. laanwj closed this on Jun 10, 2015

  12. laanwj commented at 4:04 PM on June 10, 2015: member

    ACK

  13. laanwj referenced this in commit eba2f061a0 on Jun 10, 2015
  14. jtimon cross-referenced this on Jul 15, 2015 from issue Optimizations: Consensus: In AcceptToMemoryPool, ConnectBlock, and CreateNewBlock by jtimon
  15. jtimon cross-referenced this on Nov 23, 2015 from issue nSequence-based Full-RBF opt-in by petertodd
  16. str4d cross-referenced this on Feb 14, 2017 from issue Bitcoin 0.12 misc PRs 1 by str4d
  17. zkbot referenced this in commit df07f9ad23 on Feb 15, 2017
  18. zkbot referenced this in commit ec069ce96c on Mar 3, 2017
  19. zkbot referenced this in commit 702eefc71a on Mar 3, 2017
  20. zkbot referenced this in commit 99c4c6de0c on Mar 3, 2017
  21. dagurval cross-referenced this on Mar 19, 2018 from issue Precompute sighashes by dagurval
  22. furszy cross-referenced this on Jun 10, 2020 from issue [Core] Separate Consensus CheckTxInputs and GetSpendHeight in CheckInputs by furszy
  23. Fuzzbawls referenced this in commit a5ba7200c6 on Jun 17, 2020
  24. bitcoin 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: 2026-05-20 06:55 UTC