Skip to content

Commit ff92fbf

Browse files
committed
Merge bitcoin#11529: Avoid slow transaction search with txindex enabled
7a5f930 Avoid slow transaction search with txindex enabled (João Barbosa) Pull request description: This is an alternative to bitcoin#11507 where a slow search is not attempted (in any case) if `txindex` is enabled. Tree-SHA512: e680621781a9241c0513ddd79d23b0b42f3ccec8a63ed1c926b35c43321c81c39a1028770397dd5070501dcf644d897026a2bd68a161a4b435f19227c1bbca48
2 parents 99e93de + 7a5f930 commit ff92fbf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/validation.cpp

+3
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)