0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-13 11:25:02 -05:00
bitcoin-bitcoin-core/src
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
..
bench Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
common Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
compat netbase: refactor CreateSock() to accept sa_family_t 2024-03-01 13:13:07 -05:00
config
consensus refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
crc32c Update crc32c subtree to latest upstream master 2024-02-27 18:28:19 +00:00
crypto util: move HexStr and HexDigit from util to crypto 2024-05-16 17:16:08 +02:00
index refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
init Introduce Mining interface 2024-06-18 18:47:51 +02:00
interfaces Have testBlockValidity hold cs_main instead of caller 2024-06-27 08:58:25 +02:00
ipc multiprocess: Add type conversion code for UniValue types 2023-11-28 12:35:50 -05:00
kernel Merge bitcoin/bitcoin#30007: chainparams: Add achow101 DNS seeder 2024-06-26 11:43:58 +01:00
leveldb Update leveldb-subtree subtree to latest upstream 2024-06-13 13:17:57 +01:00
logging
minisketch Update minisketch subtree to latest master 2024-06-12 14:38:39 +01:00
node Have testBlockValidity hold cs_main instead of caller 2024-06-27 08:58:25 +02:00
policy Merge bitcoin/bitcoin#28984: Cluster size 2 package rbf 2024-06-17 17:22:43 -04:00
primitives Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
qt Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
rpc Merge bitcoin/bitcoin#30335: Mining interface followups, reduce cs_main locking, test rpc bug fix 2024-06-27 18:16:27 -04:00
script Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
secp256k1 Update secp256k1 subtree to latest master 2024-06-25 15:01:00 +01:00
support scripted-diff: Fix bitcoin_config_h includes 2024-02-13 20:10:44 +00:00
test Merge bitcoin/bitcoin#30200: Introduce Mining interface 2024-06-24 19:29:48 -04:00
univalue test: Fix failing univalue float test 2024-04-16 16:35:12 +02:00
util Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
wallet Merge bitcoin/bitcoin#30050: refactor, wallet: get serialized size of CRecipients directly 2024-06-27 13:59:46 -04:00
zmq rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
.bear-tidy-config tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
.clang-format refactor: Print verbose serialize compiler error messages 2023-12-15 15:20:54 +01:00
.clang-tidy clang-tidy: Add bugprone-move-forwarding-reference check 2024-05-30 11:33:59 +01:00
addrdb.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
addrdb.h
addresstype.cpp
addresstype.h bugfix: Mark CNoDestination and PubKeyDestination constructor explicit 2023-10-25 22:46:55 +02:00
addrman.cpp Merge bitcoin/bitcoin#28929: serialization: Support for multiple parameters 2024-05-15 15:09:56 -04:00
addrman.h doc, test: Test and explain service flag handling 2024-01-15 16:19:53 -05:00
addrman_impl.h Remove timedata 2024-04-10 17:01:27 +02:00
arith_uint256.cpp refactor: Remove unused and fragile string interface from arith_uint256 2023-11-21 17:37:25 +01:00
arith_uint256.h refactor: Remove unused and fragile string interface from arith_uint256 2023-11-21 17:37:25 +01:00
attributes.h
banman.cpp Merge bitcoin/bitcoin#24097: Replace RecursiveMutex m_cs_banned with Mutex, and rename it 2023-11-02 14:09:27 -04:00
banman.h net_processing: remove Misbehavior score and increments 2024-05-30 08:35:18 -04:00
base58.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
base58.h
bech32.cpp Reduce memory copying operations in bech32 encode 2024-06-05 13:18:13 +02:00
bech32.h refactor: Model the bech32 charlimit as an Enum 2024-05-13 12:07:47 +02:00
bip324.cpp
bip324.h
bitcoin-chainstate.cpp introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-util-res.rc
bitcoin-util.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
bitcoin-wallet-res.rc
bitcoin-wallet.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoind-res.rc
bitcoind.cpp refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
blockencodings.cpp refactor: Simplify extra_txn to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> 2024-04-06 19:17:20 +01:00
blockencodings.h refactor: Simplify extra_txn to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> 2024-04-06 19:17:20 +01:00
blockfilter.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
blockfilter.h
chain.cpp
chain.h assumeutxo: Remove BLOCK_ASSUMED_VALID flag 2024-03-18 11:28:40 -05:00
chainparams.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h seeds: Update testnet seeds 2024-03-04 19:53:30 -05:00
checkqueue.h refactor: Make CCheckQueue non-copyable and non-movable explicitly 2023-10-03 10:52:17 +01:00
clientversion.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
clientversion.h scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
coins.cpp log: use error level for critical log messages 2024-06-10 13:46:56 +02:00
coins.h Merge bitcoin/bitcoin#28922: Use Txid in COutpoint 2023-11-24 14:41:58 +00:00
compressor.cpp
compressor.h refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
core_io.h Remove deprecated -rpcserialversion 2023-12-11 18:22:13 +01:00
core_memusage.h
core_read.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
core_write.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
cuckoocache.h doc: fix some typos 2024-03-26 16:51:46 +00:00
dbwrapper.cpp
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp wallet, test: Be able to always swap BDB endianness 2024-05-16 15:03:13 -04:00
external_signer.cpp external_signer: replace boost::process with cpp-subprocess 2024-03-27 14:16:37 +00:00
external_signer.h
flatfile.cpp scripted-diff: Replace error() with LogError() 2024-03-11 13:49:37 +01:00
flatfile.h
hash.cpp crypto, hash: replace custom rotl32 with std::rotl 2024-01-05 17:12:38 +01:00
hash.h Include version.h in fewer places 2023-11-16 11:36:22 +10:00
headerssync.cpp refactor: Fix timedata includes 2024-02-01 13:52:05 +01:00
headerssync.h
httprpc.cpp Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
httprpc.h
httpserver.cpp rest: don't copy data when sending binary response 2024-06-26 06:47:30 +03:00
httpserver.h rest: don't copy data when sending binary response 2024-06-26 06:47:30 +03:00
i2p.cpp Merge bitcoin/bitcoin#29833: i2p: fix and improve logs 2024-06-26 15:28:26 -04:00
i2p.h i2p: log errors properly according to their severity 2024-06-12 16:19:50 -03:00
indirectmap.h
init.cpp net: don't extra bind for Tor if binds are restricted 2024-07-02 14:17:50 +02:00
init.h Get rid of shutdown.cpp/shutdown.h, use SignalInterrupt directly 2023-12-04 15:39:15 -04:00
key.cpp refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key.h refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key_io.cpp refactor: Allow std::span construction from CKey 2024-01-16 15:29:18 +01:00
key_io.h
logging.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
logging.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
Makefile.am Merge bitcoin/bitcoin#30200: Introduce Mining interface 2024-06-24 19:29:48 -04:00
Makefile.bench.include bench: add benchmark for checkblockindex 2024-03-20 16:30:04 -04:00
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.minisketch.include build: remove minisketch clz check 2024-04-12 14:28:34 +02:00
Makefile.qt.include build, test, doc: Temporarily remove Android-related stuff 2024-05-06 11:29:14 +01:00
Makefile.qt_locale.include qt: 27.0 translations update 2024-03-04 10:02:26 +00:00
Makefile.qttest.include
Makefile.test.include introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
Makefile.test_fuzz.include fuzz: move MockedDescriptorConverter to fuzz/util 2023-11-20 15:57:50 -03:00
Makefile.test_util.include
Makefile.univalue.include
mapport.cpp upnp: add compatibility for miniupnpc 2.2.8 2024-06-18 12:24:48 +00:00
mapport.h
memusage.h
merkleblock.cpp [clang-tidy] Enable the misc-no-recursion check 2024-04-07 14:04:45 +01:00
merkleblock.h refactor: Use Txid in CMerkleBlock 2023-11-28 17:49:41 +01:00
net.cpp net: require P2P binds to succeed 2024-07-02 14:17:51 +02:00
net.h Merge bitcoin/bitcoin#29984: net: Replace ifname check with IFF_LOOPBACK in Discover 2024-05-07 10:28:58 +08:00
net_permissions.cpp util: move fees.h and error.h to common/messages.h 2024-05-16 10:16:08 -05:00
net_permissions.h Accept "in" and "out" flags to -whitelist to allow whitelisting manual connections 2024-02-28 10:05:56 -03:00
net_processing.cpp refactor: remove extraneous lock annotations from function definitions 2024-06-20 18:45:32 +00:00
net_processing.h Merge bitcoin/bitcoin#29575: net_processing: make any misbehavior trigger immediate discouragement 2024-06-20 13:28:38 -04:00
net_types.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
net_types.h
netaddress.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
netaddress.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
netbase.cpp refactor: use #ifdef HAVE_SOCKADDR_UN 2024-06-21 09:43:46 +01:00
netbase.h netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
netgroup.cpp Merge bitcoin/bitcoin#27581: net: Continuous ASMap health check 2023-12-06 11:22:42 -05:00
netgroup.h net: Add continuous ASMap health check logging 2023-12-02 22:03:08 +01:00
netmessagemaker.h refactor: NetMsg::Make() without nVersion 2023-11-20 14:02:27 +01:00
noui.cpp node: Use log levels in noui_ThreadSafeMessageBox 2024-03-21 16:41:16 +01:00
noui.h
outputtype.cpp fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
outputtype.h fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
pow.cpp
pow.h
prevector.h refactor: Mark prevector iterator with std::contiguous_iterator_tag 2024-01-18 19:29:34 +01:00
protocol.cpp protocol: make message types constexpr 2024-02-28 18:03:23 +01:00
protocol.h Merge bitcoin/bitcoin#29421: net: make the list of known message types a compile time constant 2024-05-21 13:59:33 -04:00
psbt.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
psbt.h Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
pubkey.cpp crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
pubkey.h crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
random.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
random.h crypto: replace CountBits with std::bit_width 2024-02-26 16:13:12 +00:00
randomenv.cpp randomenv: use ifdef over if 2024-06-21 09:42:32 +01:00
randomenv.h
rest.cpp rest: don't copy data when sending binary response 2024-06-26 06:47:30 +03:00
rest.h
reverse_iterator.h
scheduler.cpp scripted-diff: Rename SingleThreadedSchedulerClient to SerialTaskRunner 2024-02-15 14:43:14 +01:00
scheduler.h kernel: Remove dependency on CScheduler 2024-02-16 17:12:52 +01:00
serialize.h Merge bitcoin/bitcoin#28929: serialization: Support for multiple parameters 2024-05-15 15:09:56 -04:00
signet.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
signet.h
span.h Allow int8_t optimized vector serialization 2023-12-22 09:58:19 +01:00
streams.cpp Add AutoFile::seek and tell 2024-04-01 14:37:24 -04:00
streams.h Add AutoFile::seek and tell 2024-04-01 14:37:24 -04:00
sync.cpp util: avoid using thread_local variable that has a destructor 2024-05-16 18:16:46 +02:00
sync.h Merge bitcoin/bitcoin#27116: doc: clarify that LOCK() internally checks whether the mutex is held 2023-10-26 15:02:13 -04:00
threadsafety.h
tinyformat.h
torcontrol.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp [[refactor]] Check CTxMemPool options in constructor 2024-05-17 23:37:25 +02:00
txmempool.h [[refactor]] Check CTxMemPool options in constructor 2024-05-17 23:37:25 +02:00
txorphanage.cpp scripted-diff: Replace nNextSweep with m_next_sweep 2024-05-29 09:02:07 -07:00
txorphanage.h scripted-diff: Replace nNextSweep with m_next_sweep 2024-05-29 09:02:07 -07:00
txrequest.cpp refactor: modernize-use-default-member-init for bit-fields (C++20) 2023-12-07 11:06:01 +01:00
txrequest.h
uint256.cpp
uint256.h
undo.h Include version.h in fewer places 2023-11-16 11:36:22 +10:00
validation.cpp refactor: remove extraneous lock annotations from function definitions 2024-06-20 18:45:32 +00:00
validation.h Merge bitcoin/bitcoin#28339: validation: improve performance of CheckBlockIndex 2024-06-11 16:41:44 -04:00
validationinterface.cpp kernel: Remove dependency on CScheduler 2024-02-16 17:12:52 +01:00
validationinterface.h kernel: Remove dependency on CScheduler 2024-02-16 17:12:52 +01:00
versionbits.cpp
versionbits.h
walletinitinterface.h