bitcoin/test/functional/test_framework
Wladimir J. van der Laan 5b6f970e3f
Merge #20171: Add functional test test_txid_inv_delay
bc4a230087 Remove redundant p2p lock tacking for tx download functional tests (Antoine Riard)
d3b5eac9a9 Add mutation for functional test test_preferred_inv (Antoine Riard)
06efb3163c Add functional test test_txid_inv_delay (Antoine Riard)
a07910abcd test: Makes wtxidrelay support a generic P2PInterface option (Antoine Riard)

Pull request description:

  This is a simple functional test to increase coverage of #19988, checking that txid announcements from txid-relay peers are delayed by TXID_RELAY_DELAY, assuming we have at least another wtxid-relay peer.

  You can verify new test with the following diff :

  ```
  diff --git a/src/net_processing.cpp b/src/net_processing.cpp
  index f14db379f..2a2805df5 100644
  --- a/src/net_processing.cpp
  +++ b/src/net_processing.cpp
  @@ -773,7 +773,7 @@ void PeerManager::AddTxAnnouncement(const CNode& node, const GenTxid& gtxid, std
       auto delay = std::chrono::microseconds{0};
       const bool preferred = state->fPreferredDownload;
       if (!preferred) delay += NONPREF_PEER_TX_DELAY;
  -    if (!gtxid.IsWtxid() && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY;
  +    //if (!gtxid.IsWtxid() && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY;
       const bool overloaded = !node.HasPermission(PF_RELAY) &&
           m_txrequest.CountInFlight(nodeid) >= MAX_PEER_TX_REQUEST_IN_FLIGHT;
       if (overloaded) delay += OVERLOADED_PEER_TX_DELAY;
  ```

ACKs for top commit:
  laanwj:
    ACK bc4a230087

Tree-SHA512: 150e806bc5289feda94738756ab375c7fdd23c80c12bd417d3112043e26a91a717dc325a01079ebd02a88b90975ead5bd397ec86eb745c7870ebec379a8aa711
2020-12-16 18:45:11 +01:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py [tests] Replace bytes literals with hex literals 2020-09-03 16:47:49 +01:00
authproxy.py test: retry when write to a socket fails on macOS 2020-06-25 17:26:20 +07:00
bdb.py test: Add test_framework/bdb.py module for inspecting bdb files 2020-11-04 12:15:29 -05:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blocktools.py test: Fix deser issue in create_block 2020-11-03 12:25:55 +01:00
coverage.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py Merge #20292: test: Fix intermittent feature_taproot issue 2020-11-09 15:47:04 +01:00
messages.py Remove unused bits from service flags enum 2020-12-08 18:36:51 +01:00
muhash.py test: Add chacha20 test vectors in muhash 2020-07-16 18:10:48 +02:00
netutil.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
p2p.py Merge #20171: Add functional test test_txid_inv_delay 2020-12-16 18:45:11 +01:00
script.py Fix and improve taproot_construct comments 2020-11-26 14:56:25 -08:00
script_util.py Add script equivalent of functions in address.py 2020-11-01 17:54:19 -05:00
segwit_addr.py [tests] Rename segwit encode and decode functions 2020-09-03 16:47:49 +01:00
siphash.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
socks5.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
test_framework.py test: add is_bdb_compiled helper 2020-11-23 11:30:55 +01:00
test_node.py test: Use Popen.wait instead of RPC in assert_start_raises_init_error 2020-12-10 12:36:41 +01:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py Merge #18836: wallet: upgradewallet fixes and additional tests 2020-11-16 11:03:25 +01:00
wallet.py test: run mempool_spend_coinbase.py even with wallet disabled 2020-11-16 09:05:34 -06:00
wallet_util.py [tests] move generate_wif_key to wallet_util.py 2020-06-10 12:10:02 -04:00