Skip to content

Commit 7a5f930

Browse files
committed
Avoid slow transaction search with txindex enabled
1 parent 13f53b7 commit 7a5f930

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/validation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,9 @@ bool GetTransaction(const uint256 &hash, CTransactionRef &txOut, const Consensus
939939
return error("%s: txid mismatch", __func__);
940940
return true;
941941
}
942+
943+
// transaction not found in index, nothing more can be done
944+
return false;
942945
}
943946

944947
if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it

0 commit comments

Comments
 (0)