MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetTxBlocksToMaturity

Method GetTxBlocksToMaturity

src/wallet/wallet.cpp:3338–3345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3336}
3337
3338int CWallet::GetTxBlocksToMaturity(const CWalletTx& wtx) const
3339{
3340 if (!wtx.IsCoinBase())
3341 return 0;
3342 int chain_depth = GetTxDepthInMainChain(wtx);
3343 assert(chain_depth >= 0); // coinbase tx should not be conflicted
3344 return std::max(0, (COINBASE_MATURITY+1) - chain_depth);
3345}
3346
3347bool CWallet::IsTxImmatureCoinBase(const CWalletTx& wtx) const
3348{

Callers 1

MakeWalletTxStatusFunction · 0.80

Calls 1

IsCoinBaseMethod · 0.45

Tested by

no test coverage detected