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. 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?
  3. 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
  4. laanwj added the label Improvement on May 12, 2015
  5. Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs eb837199a0
  6. in src/main.h: 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?
  7. jtimon force-pushed on Jun 10, 2015
  8. 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.
  9. laanwj merged this on Jun 10, 2015
  10. laanwj closed this on Jun 10, 2015

  11. laanwj commented at 4:04 pm on June 10, 2015: member
    ACK
  12. laanwj referenced this in commit eba2f061a0 on Jun 10, 2015
  13. zkbot referenced this in commit df07f9ad23 on Feb 15, 2017
  14. zkbot referenced this in commit ec069ce96c on Mar 3, 2017
  15. zkbot referenced this in commit 702eefc71a on Mar 3, 2017
  16. zkbot referenced this in commit 99c4c6de0c on Mar 3, 2017
  17. Fuzzbawls referenced this in commit a5ba7200c6 on Jun 17, 2020
  18. MarcoFalke 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-07-08 22:13 UTC

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