Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Avoid slow transaction search with txindex enabled #11529

Merged
merged 1 commit into from Oct 19, 2017

Conversation

Projects
None yet
5 participants
Contributor

promag commented Oct 19, 2017

This is an alternative to #11507 where a slow search is not attempted (in any case) if txindex is enabled.

Contributor

promag commented Oct 19, 2017

Ping @sipa after IRC discussion.

Owner

laanwj commented Oct 19, 2017

Is this preferable to #11507 which is an elegant one-line change?

Edit: Now this is a one-line change too

src/validation.cpp
@@ -939,6 +939,8 @@ bool GetTransaction(const uint256 &hash, CTransactionRef &txOut, const Consensus
return error("%s: txid mismatch", __func__);
return true;
}
+
+ return false;
@MarcoFalke

MarcoFalke Oct 19, 2017

Member

Mind to add a tiny comment to explain why fAllowSlow can be ignored?

@promag

promag Oct 19, 2017

Contributor

Done.

Owner

laanwj commented Oct 19, 2017

utACK 7a5f930

Member

achow101 commented Oct 19, 2017

utACK 7a5f930

Member

sdaftuar commented Oct 19, 2017

utACK

@laanwj laanwj added the RPC/REST/ZMQ label Oct 19, 2017

@laanwj laanwj merged commit 7a5f930 into bitcoin:master Oct 19, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Oct 19, 2017

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

luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Nov 11, 2017

codablock added a commit to codablock/dash that referenced this pull request Nov 19, 2017

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

UdjinM6 added a commit to dashpay/dash that referenced this pull request Nov 22, 2017

Merge pull request #1729 from codablock/backport_bitcoin_11529
Backport bitcoin #11529: Avoid slow transaction search with txindex enabled (João Barbosa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment