MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetDepthInMainChain

Method GetDepthInMainChain

src/wallet.cpp:4558–4575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4556}
4557
4558int CMerkleTx::GetDepthInMainChain(const CBlockIndex*& pindexRet, bool enableIX) const
4559{
4560 AssertLockHeld(cs_main);
4561 int nResult = GetDepthInMainChainINTERNAL(pindexRet);
4562 if (nResult == 0 && !mempool.exists(GetHash()))
4563 return -1; // Not in chain, not in mempool
4564
4565 if (enableIX) {
4566 if (nResult < 6) {
4567 int signatures = GetTransactionLockSignatures();
4568 if (signatures >= INSTANTX_SIGNATURES_REQUIRED) {
4569 return nInstanTXDepth + nResult;
4570 }
4571 }
4572 }
4573
4574 return nResult;
4575}
4576
4577int CMerkleTx::GetBlocksToMaturity() const
4578{

Callers 15

WalletTxToJSONFunction · 0.45
getreceivedbyaddressFunction · 0.45
getreceivedbyaccountFunction · 0.45
GetAccountBalanceFunction · 0.45
getbalanceFunction · 0.45
ListReceivedFunction · 0.45
ListTransactionsFunction · 0.45
listaccountsFunction · 0.45
listsinceblockFunction · 0.45
gettransactionFunction · 0.45
IsSpentMethod · 0.45
AbandonTransactionMethod · 0.45

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected