[bitcoin/bitcoin] Add CMerkleTx::IsImmatureCoinBase method (#13631)

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.
You can view, comment on, or merge this pull request online at:

https://github.com/bitcoin/bitcoin/pull/13631

— Commit Summary —

* Add CMerkleTx::IsImmatureCoinBase method

— File Changes —

M src/wallet/rpcwallet.cpp (4)
M src/wallet/wallet.cpp (16)
M src/wallet/wallet.h (2)

— Patch Links —

https://github.com/bitcoin/bitcoin/pull/13631.patch
https://github.com/bitcoin/bitcoin/pull/13631.diff

This post was last modified on July 11, 2018, 7:21 am