aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_tx_download.py
AgeCommit message (Collapse)Author
2024-09-24test: Add missing sync_mempools() to fill_mempool()MarcoFalke
Also disable the function, when it is not needed.
2024-08-29test: [refactor] Fix F841 flake8MarcoFalke
2024-07-16scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()`Hennadii Stepanov
-BEGIN VERIFY SCRIPT- sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py) sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py -END VERIFY SCRIPT-
2024-05-05test: use tagged ephemeral MiniWallet instance in fill_mempoolSebastian Falbesoner
2024-05-05test: refactor: move fill_mempool to new module mempool_utilSebastian Falbesoner
This is needed to avoid circular dependencies in later commits. Can be reviewed via `--color-moved=dimmed-zebra`.
2024-04-22test: Fix intermittent timeout in p2p_tx_download.pyMarcoFalke
2024-04-15test: p2p: add test for rejected tx request logic (`m_recent_rejects` filter)Sebastian Falbesoner
2023-01-19test: refactor: simplify p2p_tx_download.py by using MiniWalletSebastian Falbesoner
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-06-21test: introduce `tx_from_hex` helper for tx deserializationSebastian Falbesoner
`FromHex` is mostly used for transactions, so we introduce a shortcut `tx_from_hex` for `FromHex(CTransaction, hex_str)`.
2021-02-01scripted-diff: Remove setup_clean_chain if default is not changedFabian Jahr
-BEGIN VERIFY SCRIPT- git grep -l "self.setup_clean_chain = False" test/functional/*.py | xargs sed -i "/self.setup_clean_chain = False/d"; -END VERIFY SCRIPT-
2020-11-02Remove redundant p2p lock tacking for tx download functional testsAntoine Riard
New functional test coverage of tx download was added by #19988, but `with p2p_lock` is redundant for some tests with `wait_until` test helper, already guaranteeing test lock tacking.
2020-11-02Add mutation for functional test test_preferred_invAntoine Riard
Add a booelan arg to test_preferred_inv to cover NONPREF_PEER_TX_DELAY as applied as a TxRequestTracker parameter in AddTxAnnouncement.
2020-11-02Add functional test test_txid_inv_delayAntoine Riard
Add a simple functional test to cover TXID_RELAY_DELAY as applied as a TxRequestTracker parameter in AddTxAnnoucement.
2020-11-02test: Makes wtxidrelay support a generic P2PInterface optionAntoine Riard
Its usage is extended beyond p2p_segwit.py in next commit.
2020-10-12Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peersPieter Wuille
Maintaining up to 100000 INVs per peer is excessive, as that is far more than fits in a typical mempool. Also disable the "overload" penalty for PF_RELAY peers.
2020-10-12Change transaction request logic to use txrequestPieter Wuille
This removes most transaction request logic from net_processing, and replaces it with calls to a global TxRequestTracker object. The major changes are: * Announcements from outbound (and whitelisted) peers are now always preferred over those from inbound peers. This used to be the case for the first request (by delaying the first request from inbound peers), and a bias afters. The 2s delay for requests from inbound peers still exists, but after that, if viable outbound peers remain for any given transaction, they will always be tried first. * No more hard cap of 100 in flight transactions per peer, as there is less need for it (memory usage is linear in the number of announcements, but independent from the number in flight, and CPU usage isn't affected by it). Furthermore, if only one peer announces a transaction, and it has over 100 in flight and requestable already, we still want to request it from them. The cap is replaced with an additional 2s delay (possibly combined with the existing 2s delays for inbound connections, and for txid peers when wtxid peers are available). Includes functional tests written by Marco Falke and Antoine Riard.
2020-10-08Use mockable time everywhere in net_processingPieter Wuille
2020-08-26test: Update wait_until usage in tests not to use the one from utilsSeleme Topuz
Replace "wait_until()" usage from utils, with the ones from BitcoinTestFramework and P2PInterface. closes #19080
2020-08-21scripted-diff: Rename mininode to p2pJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/\.mininode/\.p2p/g' $(git grep -l "mininode") git mv test/functional/test_framework/mininode.py test/functional/test_framework/p2p.py -END VERIFY SCRIPT-
2020-08-21scripted-diff: Rename mininode_lock to p2p_lockJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/mininode_lock/p2p_lock/g' $(git grep -l "mininode_lock") -END VERIFY SCRIPT-
2020-08-06refactor: test: use _ variable for unused loop countersSebastian Falbesoner
substitutes "for x in range(N):" by "for _ in range(N):" indicates to the reader that a block is just repeated N times, and that the loop counter is not used in the body
2020-07-19test: Use wtxid relay generally in functional testsFabian Jahr
2020-07-19Delay getdata requests from peers using txid-based relaySuhas Daftuar
Using both txid and wtxid-based relay with peers means that we could sometimes download the same transaction twice, if announced via two different hashes from different peers. Use a heuristic of delaying txid-peer-getdata requests by 2 seconds, if we have at least one wtxid-based peer.
2020-05-07test: replace inv type magic numbers by constantsSebastian Falbesoner
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-13test: Add various low-level p2p testsMarcoFalke
2020-04-01test: replace (send_message + sync_with_ping) with send_and_pingJon Atack
2019-09-17test: Use connect_nodes when connecting nodes in the test_frameworkMarcoFalke
2019-06-19[qa] Test that getdata requests work as expectedSuhas Daftuar
We should eventually request a transaction from all peers that announce it (assuming we never receive it). We should prefer requesting from outbound peers over inbound peers. Enforce the max tx requests in flight, and the eventual expiry of those requests. Test author: Suhas Daftuar <sdaftuar@gmail.com> Adjusted by: MarcoFalke