Page MenuHomePhabricator

[backport#13657] wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturity
ClosedPublic

Authored by majcosta on Jul 24 2020, 02:59.

Details

Summary

93de2891fa9cb8314573ba3a6ab764bc9c52444d wallet: assert to ensure accuracy of CMerkleTx::GetBlocksToMaturity (Ben Woosley)

Pull request description:

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.

https://github.com/bitcoin/bitcoin/pull/13657/commits/93de2891fa9cb8314573ba3a6ab764bc9c52444d


Backport of Core PR13657

Test Plan
ninja check check-functional

Event Timeline

This revision is now accepted and ready to land.Jul 24 2020, 12:42

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.