Avoid slow transaction search with txindex enabled #11529

pull promag wants to merge 1 commits into bitcoin:master from promag:2017-10-txindex-get-transaction changing 1 files +3 −0
  1. promag commented at 2:30 PM on October 19, 2017: member

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

  2. promag commented at 2:31 PM on October 19, 2017: member

    Ping @sipa after IRC discussion.

  3. laanwj commented at 2:33 PM on October 19, 2017: member

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

    Edit: Now this is a one-line change too

  4. promag force-pushed on Oct 19, 2017
  5. in src/validation.cpp:944 in a11fb50fd1 outdated
     938 | @@ -939,6 +939,8 @@ bool GetTransaction(const uint256 &hash, CTransactionRef &txOut, const Consensus
     939 |                  return error("%s: txid mismatch", __func__);
     940 |              return true;
     941 |          }
     942 | +
     943 | +        return false;
    


    MarcoFalke commented at 2:57 PM on October 19, 2017:

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


    promag commented at 3:02 PM on October 19, 2017:

    Done.

  6. MarcoFalke commented at 2:57 PM on October 19, 2017: member

    ACK

  7. Avoid slow transaction search with txindex enabled 7a5f9303a9
  8. promag force-pushed on Oct 19, 2017
  9. laanwj cross-referenced this on Oct 19, 2017 from issue [RPC] Don't do slow transaction lookup when txindex is enabled by achow101
  10. achow101 commented at 5:07 PM on October 19, 2017: member

    utACK 7a5f9303a9ed8e9efa25f8264ed491644e451645

  11. sdaftuar commented at 5:24 PM on October 19, 2017: member

    utACK

  12. laanwj added the label RPC/REST/ZMQ on Oct 19, 2017
  13. laanwj merged this on Oct 19, 2017
  14. laanwj closed this on Oct 19, 2017

  15. laanwj referenced this in commit ff92fbf247 on Oct 19, 2017
  16. fanquake cross-referenced this on Oct 21, 2017 from issue getrawtransaction delay too long on non-existent txid by doersf
  17. luke-jr referenced this in commit 5f80fcb074 on Nov 11, 2017
  18. UdjinM6 cross-referenced this on Nov 18, 2017 from issue Avoid running the fAllowSlow code path in case the txindex is available by codablock
  19. codablock referenced this in commit 371feda4ce on Nov 19, 2017
  20. UdjinM6 referenced this in commit 3e86c41be5 on Nov 22, 2017
  21. andvgal referenced this in commit e312e29da4 on Dec 26, 2018
  22. jasonbcox referenced this in commit 70575e5662 on Mar 26, 2019
  23. jonspock referenced this in commit befc09e18f on Apr 6, 2019
  24. jonspock referenced this in commit ff37a9f506 on Apr 8, 2019
  25. jonspock referenced this in commit 251d8051e1 on Apr 8, 2019
  26. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC