wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturity #13657

pull Empact wants to merge 1 commits into bitcoin:master from Empact:accurate-get-blocks-to-maturity changing 1 files +3 −1
  1. Empact commented at 4:45 PM on July 13, 2018: member

    According to my understanding, it should not be possible for coinbase transactions to be conflicting, thus it should not be possible for GetDepthInMainChain to return a negative result. If it did, this would also result in innacurate results for GetBlocksToMaturity due to the math therein. asserting ensures accuracy.

  2. wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturity
    According to my understanding, it should not be possible for coinbase
    transactions to be conflicting, thus it should not be possible for
    GetDepthInMainChain to return a negative result. If it did, this would
    also result in innacurate results for GetBlocksToMaturity due to the
    math therein. asserting ensures accuracy.
    93de2891fa
  3. Empact cross-referenced this on Jul 13, 2018 from issue Add CMerkleTx::IsImmatureCoinBase method by Empact
  4. promag commented at 8:47 PM on July 13, 2018: member

    Coinbase transactions can't conflict because they don't spend transaction outputs.

    Is this the only place this assert makes sense?

  5. sipa commented at 9:48 PM on July 13, 2018: member

    utACK 93de2891fa9cb8314573ba3a6ab764bc9c52444d

  6. Empact commented at 10:25 PM on July 13, 2018: member

    @promag did a quick look over and did not see anything apparent.

  7. fanquake added the label Wallet on Jul 13, 2018
  8. DrahtBot commented at 8:12 PM on August 3, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:

    • #10973 (Refactor: separate wallet from node by ryanofsky)

    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. laanwj commented at 12:20 PM on August 7, 2018: member

    utACK 93de2891fa9cb8314573ba3a6ab764bc9c52444d

  10. laanwj merged this on Aug 7, 2018
  11. laanwj closed this on Aug 7, 2018

  12. laanwj referenced this in commit 51c693d49e on Aug 7, 2018
  13. ryanofsky cross-referenced this on Aug 7, 2018 from issue Refactor: separate wallet from node by ryanofsky
  14. Bushstar cross-referenced this on Aug 13, 2018 from issue commits from bitcoin/master by Bushstar
  15. PastaPastaPasta referenced this in commit 3f9a3fe344 on Dec 16, 2020
  16. PastaPastaPasta referenced this in commit b5ec0eeefc on Dec 18, 2020
  17. PastaPastaPasta referenced this in commit 4d0edcfbdd on Dec 18, 2020
  18. 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