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. 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?

  4. sipa commented at 9:48 pm on July 13, 2018: member
    utACK 93de2891fa9cb8314573ba3a6ab764bc9c52444d
  5. Empact commented at 10:25 pm on July 13, 2018: member
    @promag did a quick look over and did not see anything apparent.
  6. fanquake added the label Wallet on Jul 13, 2018
  7. DrahtBot commented at 8:12 pm on August 3, 2018: member
    • #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.

  8. laanwj commented at 12:20 pm on August 7, 2018: member
    utACK 93de2891fa9cb8314573ba3a6ab764bc9c52444d
  9. laanwj merged this on Aug 7, 2018
  10. laanwj closed this on Aug 7, 2018

  11. laanwj referenced this in commit 51c693d49e on Aug 7, 2018
  12. PastaPastaPasta referenced this in commit 3f9a3fe344 on Dec 16, 2020
  13. PastaPastaPasta referenced this in commit b5ec0eeefc on Dec 18, 2020
  14. PastaPastaPasta referenced this in commit 4d0edcfbdd on Dec 18, 2020
  15. 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-11-17 06:12 UTC

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