Skip to content

Commit

Permalink
Avoid slow transaction search with txindex enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Oct 19, 2017
1 parent 13f53b7 commit 7a5f930
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a5f930

Please sign in to comment.