Page MenuHomePhabricator

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

Authored by majcosta on Fri, Jul 24, 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

majcosta created this revision.Fri, Jul 24, 02:59
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Jul 24, 02:59
majcosta requested review of this revision.Fri, Jul 24, 02:59
Fabien accepted this revision.Fri, Jul 24, 12:42
This revision is now accepted and ready to land.Fri, Jul 24, 12:42
teamcity edited the summary of this revision. (Show Details)Mon, Jul 27, 22:02

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