Page MenuHomePhabricator

Add CMerkleTx::IsImmatureCoinBase method
ClosedPublic

Authored by schancel on Oct 25 2018, 22:02.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr13631
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3683
Build 5441: Bitcoin ABC Buildbot (legacy)
Build 5440: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Oct 25 2018, 22:14
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/wallet/rpcwallet.cpp
1693

You forgot that one.

This revision now requires changes to proceed.Oct 25 2018, 22:14

Fix immaturecoinbase spot

schancel added inline comments.
src/wallet/rpcwallet.cpp
1693

Thanks, fixed.

This revision is now accepted and ready to land.Oct 26 2018, 22:09
This revision was automatically updated to reflect the committed changes.
schancel marked an inline comment as done.