From 7a5f9303a9ed8e9efa25f8264ed491644e451645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Thu, 19 Oct 2017 15:49:45 +0100 Subject: [PATCH] Avoid slow transaction search with txindex enabled --- src/validation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 1a1c1941e..d19521bd3 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