HomePhabricator

Add CMerkleTx::IsImmatureCoinBase method

Description

Add CMerkleTx::IsImmatureCoinBase method

Summary:
All but one call to GetBlocksToMaturity is testing it relative to 0
for the purposes of determining whether the coinbase tx is immature.
In such case, the value greater than 0 implies that the tx is coinbase,
so there is no need to separately test that status.

This names the concept for easy singular use.

Backport of Core PR13631

Test Plan:

make VERBOSE=1 check && ./test/functional/test_runner.py

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1973

Details

Provenance
Ben Woosley <ben.woosley@gmail.com>Authored on Jul 11 2018, 05:17
schancelCommitted on Oct 26 2018, 22:57
schancelPushed on Oct 26 2018, 22:57
Reviewer
Restricted Project
Differential Revision
D1973: Add CMerkleTx::IsImmatureCoinBase method
Parents
rABCbaa67e29cbc4: qa: Fix inv race in example_test
Branches
Unknown
Tags
Unknown

Event Timeline