aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_proxy.py
AgeCommit message (Collapse)Author
2024-07-30test: fix intermittent failures in feature_proxy.pyMartin Zumsande
If addnode connections are made with v2transport and the peer immediately disconnects us, reconnections with v1 are scheduled. This could interfere with later checks depending on timing. Avoid this by using `v2transport=False` in the addnode rpc - this test isn't about the message layer anyway, so running it with v2 would add no value.
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-03-01test: cover UNIX sockets in feature_proxy.pyMatthew Zipkin
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-10-05Validate `port` optionsamadeuszpawlik
Check `port` options for invalid values (ports are parsed as uint16, so in practice values >65535 are invalid; port 0 is undefined and therefore considered invalid too). This allows for an early rejection of faulty values and an supplying an informative message to the user. Splits tests in `feature_proxy.py` to cover both invalid `hostname` and `port` values. Adds a release-note as previously valid `-port` and `-rpcport` values can now result in errors.
2022-09-19init: Abort if i2p/cjdns are chosen via -onlynet but unreachableMartin Zumsande
...because -i2psam or -cjdnsreachable are not provided. This mimics existing behavior for -onlynet=onion and non-specified proxy.
2022-09-05init: allow startup with -onlynet=onion -listenonion=1Vasil Dimov
It does not make sense to specify `-onlynet=onion` without providing a Tor proxy (even if other `-onlynet=...` are given). This is checked during startup. However, it was forgotten that a Tor proxy can also be retrieved from "Tor control" to which we connect if `-listenonion=1`. So, the full Tor proxy retrieval logic is: 1. get it from `-onion` 2. get it from `-proxy` 3. if `-listenonion=1`, then connect to "Tor control" and get the proxy from there (was forgotten before this change) Fixes https://github.com/bitcoin/bitcoin/issues/24980
2022-06-10test: Fix out-of-range port collisionsMacroFake
2022-05-19test: add coverage for unknown network in -onlynetbrunoerg
2022-03-28Merge bitcoin/bitcoin#24687: test: Check an invalid -i2psam will raise an ↵MarcoFalke
init error 45e67b2695852c94d5da3f9b82f2b567cbbd2cc3 test: invalid -i2psam will raise an init error (brunoerg) Pull request description: This PR adds test coverage (at `feature_proxy.py`) for the following init error: https://github.com/bitcoin/bitcoin/blob/2f0f056e08cd5a1435120592a9ecd212fcdb915b/src/init.cpp#L1791 It starts the node with an invalid -i2psam (`-i2psam=invalidhere`) and test if it raises an error when initializing. ACKs for top commit: dunxen: Code review ACK 45e67b2 Tree-SHA512: b24e3f6e7a9316b9ebc0b6c8bcf1315faff60a9e258d7bb3dbeb9f6695a728bb3083aea2f81114072fe13822bfca34d4a0f44f229825f7c97a81619d810010c0
2022-03-28Merge bitcoin/bitcoin#24258: test: check localaddresses in getnetworkinfo ↵MarcoFalke
for nodes with proxy 89bb25d22a0e1c700dba4e3b754984c9b2b14836 test: check localaddresses in getnetworkinfo for nodes with proxy (brunoerg) Pull request description: This PR adds test coverage for the field `localaddresses` for `getnetworkinfo`. In this case, it verifies if this field is empty for all nodes since they are using proxy. Reference: https://github.com/bitcoin/bitcoin/blob/515200298b555845696a07ae2bc0a84a5dd02ae4/src/init.cpp#L449 ACKs for top commit: jonatack: ACK 89bb25d22a0e1c700dba4e3b754984c9b2b14836 Tree-SHA512: 3c765c7060b6972c1ae5a1104734cd7669b650b5f6aa4f623f4299567732260da5083fef306a7c1e71c931f5d1396f24abad251d95c3d82b1f3ee0efee7fcd1f
2022-03-26test: invalid -i2psam will raise an init errorbrunoerg
2022-03-22test: check localaddresses in getnetworkinfo for nodes with proxybrunoerg
2022-03-03test: passing -onlynet=onion with -onion=0/-noonion raises expected init errorJon Atack
2022-03-03test: passing -onlynet=onion without -proxy/-onion raises expected init errorJon Atack
2022-03-03test: passing invalid -onion raises expected init errorJon Atack
2022-03-03test: passing invalid -proxy raises expected init errorJon Atack
2022-03-01test: hoist proxy out of 2 network loops in feature_proxy.pyJon Atack
2021-11-24net: respect -onlynet= when making outbound connectionsVasil Dimov
Do not make outbound connections to hosts which belong to a network which is restricted by `-onlynet`. This applies to hosts that are automatically chosen to connect to and to anchors. This does not apply to hosts given to `-connect`, `-addnode`, `addnode` RPC, dns seeds, `-seednodes`. Fixes https://github.com/bitcoin/bitcoin/issues/13378 Fixes https://github.com/bitcoin/bitcoin/issues/22647 Supersedes https://github.com/bitcoin/bitcoin/pull/22651
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-11-03test: extend feature_proxy.py to test CJDNSVasil Dimov
2021-11-03test: remove default argument of feature_proxy.py:node_test()Vasil Dimov
The default bool argument makes it harder to read because the last but one argument is also bool. Pass all of them as named arguments to increase readability. Another bool argument will be added to indicate whether to test CJDNS. Co-authored-by: Jon Atack <jon@atack.com>
2021-11-03net: don't skip CJDNS from GetNetworksInfo()Vasil Dimov
2021-08-18test: use f-strings in feature_proxy.pyfanquake
2021-05-27test: update feature_proxy to torv3Jon Atack
2021-03-01init: introduce I2P connectivity optionsVasil Dimov
Introduce two new options to reach the I2P network: * `-i2psam=<ip:port>` point to the I2P SAM proxy. If this is set then the I2P network is considered reachable and we can make outgoing connections to I2P peers via that proxy. We listen for and accept incoming connections from I2P peers if the below is set in addition to `-i2psam=<ip:port>` * `-i2pacceptincoming` if this is set together with `-i2psam=<ip:port>` then we accept incoming I2P connections via the I2P SAM proxy.
2021-02-02net: update NET_UNROUTABLE to not_publicly_routable in GetNetworkName()Jon Atack
2020-12-31scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-10-15test: add getnetworkinfo network name regression testsJon Atack
2020-10-14rpc, test: expose CNodeStats network in RPC getpeerinfoJon Atack
2019-03-02scripted-diff: Update copyright in ./testMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2019-03-02scripted-diff: test: Remove brackets after assertMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test) -END VERIFY SCRIPT-
2019-02-19qa: Fix wallet_txn_doublespend issueMarcoFalke
2019-02-19qa: Always refresh stale cache to be out of ibdMarcoFalke
2018-07-27Update copyright headers to 2018DrahtBot
2018-05-11Enable W191 and W291 flake8 checks.John Bampton
Remove trailing whitespace from Python files. Convert tabs to spaces.
2018-04-16Minor Python cleanups to make flake8 pass with the new rules enabledpracticalswift
2018-01-25[tests] Rename feature_* functional tests.Anthony Towns