Skip to content

Commit 3e86c41

Browse files
authored
Merge pull request dashpay#1729 from codablock/backport_bitcoin_11529
Backport bitcoin bitcoin#11529: Avoid slow transaction search with txindex enabled (João Barbosa)
2 parents ccbd527 + 371feda commit 3e86c41

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
@@ -1112,6 +1112,9 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::P
11121112
return error("%s: txid mismatch", __func__);
11131113
return true;
11141114
}
1115+
1116+
// transaction not found in index, nothing more can be done
1117+
return false;
11151118
}
11161119

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

0 commit comments

Comments
 (0)