Commit graph

9 commits

Author SHA1 Message Date
Vasil Dimov
bca346a970
net: require P2P binds to succeed
In the Tor case, this prevents us from telling the Tor daemon to send
our incoming connections from the Tor network to an address where we
do not listen (we tried to listen but failed probably because another
application is already listening).

In the other cases (IPv4/IPv6 binds) this also prevents unpleasant
surprises caused by continuing operations even on bind failure. For
example, another application may be listening on portX, bitcoind tries
to bind on portX and portY, only succeeds with portY and continues
operation leaving the user thinking that his bitcoind is listening on
portX whereas another application is listening (the error message in
the log could easily be missed).

Avoid having the functional testing framework start multiple `bitcoind`s
that try to listen on the same `127.0.0.1:18445` (Tor listen for
regtest) if `bind_to_localhost_only` is set to `False`.

Also fix a typo in `test-shell.md` related to `bind_to_localhost_only`.

Fixes https://github.com/bitcoin/bitcoin/issues/22727
2024-07-02 14:17:51 +02:00
willcl-ark
4b9f49da2b
doc: fix broken relative md links
These relative links in our documentation are broken, fix them.
2024-05-03 16:07:12 +01:00
ismaelsadeeq
14405e8d4d doc: test: update TestShell instructions
add missing parentheses `TestShell.method` should be `TestShell().method`.
2023-06-16 22:55:36 +01:00
Sebastian Falbesoner
31d0067f8b doc: test: update/fix TestShell example instructions
Tackles two issues in the TestShell documentation:
- add missing instruction for creating a wallet prior to the
  `getnewaddress` call (needed as there is no default wallet created
  anymore since v0.21)
- fix `generatetoaddress` call syntax (the scripted-diff in commit
  fa0b916971 only worked for tests using
  `BitcoinTestFramework`)
2022-11-17 12:04:13 +01:00
MarcoFalke
fa0b916971
scripted-diff: Use generate* from TestFramework
-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i \
     's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \
     $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf')
-END VERIFY SCRIPT-
2021-09-02 10:34:35 +02:00
Fabian Jahr
98892f39e3
doc: Improve setup_clean_chain documentation 2021-02-01 23:13:35 +01:00
James Chiang
2493770e36 TestShell: Return self from setup()
This allows user to chain setup() to the initializer. test-shell.md code
examples have been updated to reflect this.
2019-11-05 12:55:52 +01:00
James Chiang
9c7806e4bf Doc: Remove backticks in test-shell.md code block 2019-11-05 12:55:52 +01:00
JamesC
19139ee034 Add documentation for test_shell submodule 2019-11-04 16:02:28 +01:00