aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_blocksonly.py
AgeCommit message (Collapse)Author
2021-05-31Use COINBASE_MATURITY constant in functional tests.Kiminuo
2021-05-06test: use MiniWallet for p2p_blocksonly.pySebastian Falbesoner
This test can now be run even with the Bitcoin Core wallet disabled.
2021-04-28test: Fix intermittent issue in p2p_addr_relay.pyMarcoFalke
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-
2021-01-07[test] P2PBlocksOnly - Test block-relay-only connections.Amiti Uttarwar
Ensure we will disconnect if the peer sends us a transaction & we don't announce transactions to the peer.
2021-01-07[test/refactor] P2PBlocksOnly - Extract transaction violation test into helper.Amiti Uttarwar
This is in preparation for use in the next commit.
2021-01-07[test/refactor] P2PBlocksOnly - simplify transaction creation using ↵Amiti Uttarwar
blocktool helper.
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-12-26[rpc] Remove deprecated "whitelisted" field from getpeerinfoAmiti Uttarwar
2020-10-14RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions")Luke Dashjr
2020-09-25Merge #19804: test/refactor: reference p2p objects explicitly and remove ↵MarcoFalke
confusing Test_Node.p2p property 10d61505fe77880d6989115defa5e08417f3de2d [test] remove confusing p2p property (gzhao408) 549d30faf04612d9589c81edf9770c99e3221885 scripted-diff: replace p2p with p2ps[0] in p2p_invalid_tx (gzhao408) 7a0de46aeafb351cffa3410e1aae9809fd4698ad [doc] sample code for test framework p2p objects (gzhao408) 784f757994c1306bb6584b14c0c78617d6248432 [refactor] clarify tests by referencing p2p objects directly (gzhao408) Pull request description: The `TestNode` has a `p2p` property which is an alias for `p2ps[0]`. I think this should be removed because it can be confusing and misleading (to both the test writer and reviewer), especially if a TestNode has multiple p2ps connected (which is the case for many tests). Another example is when a test has multiple subtests that connect 1 p2p and use the `p2p` property to reference it. If the subtests don't completely clean up after themselves, the subtests may affect one another. The best way to refer to a connected p2p is use the object returned by `add_p2p_connection` like this: ```py p2p_conn = node.add_p2p_connection(P2PInterface()) ``` A good example is [p2p_invalid_locator.py](https://github.com/bitcoin/bitcoin/blob/master/test/functional/p2p_invalid_locator.py), which cleans up after itself (waits in both `wait_for_disconnect` and in `disconnect_p2ps`) but wouldn't need so much complexity if it just referenced the connections directly. If there is only one connected, it's not really that tedious to just use `node.p2ps[0]` instead of `node.p2p` (and it can always be aliased inside the test itself). ACKs for top commit: robot-dreams: utACK 10d61505fe77880d6989115defa5e08417f3de2d jnewbery: utACK 10d61505fe77880d6989115defa5e08417f3de2d guggero: Concept ACK 10d61505. Tree-SHA512: 5965548929794ec660dae03467640cb2156d7d826cefd26d3a126472cbc2494b855c1d26bbb7b412281fbdc92b9798b9765a85c27bc1a97f7798f27f64db6f13
2020-09-21Clarify blocksonly whitelistforcerelay testt-bast
As discussed in https://github.com/bitcoin/bitcoin/issues/19943, this test may be a bit misleading to newcomers. We underscore the fact that our peer needs to run a modified version of Bitcoin Core to actually relay transactions to a `blocksonly` node and benefit from the `whitelistforcerelay` parameter.
2020-09-10[refactor] clarify tests by referencing p2p objects directlygzhao408
Use object returned from add_p2p_connection to refer to p2ps. Add a test class attribute if it needs to be used across many methods. Don't use the p2p property.
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-07-19test: Use wtxid relay generally in functional testsFabian Jahr
2020-07-10doc: Use precise permission flags where possibleMarcoFalke
2020-07-09net: Extract download permission from nobanMarcoFalke
2020-05-04Add test for param interaction b/w -blocksonly and -whitelistforcerelayglowang
2019-09-04Disconnect peers violating blocks-only modeSuhas Daftuar
If we set fRelay=false in our VERSION message, and a peer sends an INV or TX message anyway, disconnect. Since we use fRelay=false to minimize bandwidth, we should not tolerate remaining connected to a peer violating the protocol.
2019-05-13test: Add test for p2p_blocksonlyMarcoFalke