| 4556 | } |
| 4557 | |
| 4558 | int 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 | |
| 4577 | int CMerkleTx::GetBlocksToMaturity() const |
| 4578 | { |
no test coverage detected