aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-10-19 20:04:44 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-10-19 20:04:57 +0200
commitff92fbf24739a022eb677daab03c87c5e6971094 (patch)
tree9328adac4daf0724a8b47ca7a104d55c0773bcdb
parent99e93de6f8ab4fcaa244686bb047d184e74c3e27 (diff)
parent7a5f9303a9ed8e9efa25f8264ed491644e451645 (diff)
Merge #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 #11507 where a slow search is not attempted (in any case) if `txindex` is enabled. Tree-SHA512: e680621781a9241c0513ddd79d23b0b42f3ccec8a63ed1c926b35c43321c81c39a1028770397dd5070501dcf644d897026a2bd68a161a4b435f19227c1bbca48
-rw-r--r--src/validation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 1a1c1941ef..d19521bd3c 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -939,6 +939,9 @@ bool GetTransaction(const uint256 &hash, CTransactionRef &txOut, const Consensus
return error("%s: txid mismatch", __func__);
return true;
}
+
+ // transaction not found in index, nothing more can be done
+ return false;
}
if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it