diff --git a/src/main.cpp b/src/main.cpp index 2f02208e80..50a92d1b85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1216,22 +1216,22 @@ int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const minConfirms = IsTransactionLocked(); if (hashBlock == 0 || nIndex == -1) - return 0; + return minConfirms; // Find the block it claims to be in map::iterator mi = mapBlockIndex.find(hashBlock); if (mi == mapBlockIndex.end()) - return 0; + return minConfirms; CBlockIndex* pindex = (*mi).second; if (!pindex || !pindex->IsInMainChain()) - return 0; + return minConfirms; // Make sure the merkle branch connects to this block if (!fMerkleVerified) { if (CBlock::CheckMerkleBranch(GetHash(), vMerkleBranch, nIndex) != pindex->hashMerkleRoot) - return 0; + return minConfirms; fMerkleVerified = true; }