bitcoin/src
MarcoFalke c4fc899442
Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details
021f86953e [style] Run changed files through clang formatter. (Amiti Uttarwar)
375750387e scripted-diff: Rename CAddrInfo to AddrInfo (Amiti Uttarwar)
dd8f7f2500 scripted-diff: Rename CAddrMan to AddrMan (Amiti Uttarwar)
3c263d3f63 [includes] Fix up included files (Amiti Uttarwar)
29727c2aa1 [doc] Update comments (Amiti Uttarwar)
14f9e000d0 [refactor] Update GetAddr_() function signature (Amiti Uttarwar)
40acd6fc9a [move-only] Move constants to test-only header (Amiti Uttarwar)
7cf41bbb38 [addrman] Change CAddrInfo access (Amiti Uttarwar)
e3f1ea659c [move-only] Move CAddrInfo to test-only header file (Amiti Uttarwar)
7cba9d5618 [net, addrman] Remove external dependencies on CAddrInfo objects (Amiti Uttarwar)
8af5b54f97 [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation. (Amiti Uttarwar)
f2e5f38f09 [move-only] Match ordering of CAddrMan declarations and definitions (Amiti Uttarwar)
5faa7dd6d8 [move-only] Move CAddrMan function definitions to cpp (Amiti Uttarwar)

Pull request description:

  Introduce the pimpl pattern for AddrMan to separate the implementation details from the externally used object representation. This reduces compile-time dependencies and conceptually clarifies AddrMan's interface from the implementation specifics.

  Since the unit & fuzz tests currently rely on accessing AddrMan internals, this PR introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files.

ACKs for top commit:
  jnewbery:
    ACK 021f86953e
  GeneFerneau:
    utACK [021f869](021f86953e)
  mzumsande:
    ACK 021f86953e
  rajarshimaitra:
    Concept + Code Review ACK 021f86953e
  theuni:
    ACK 021f86953e

Tree-SHA512: aa70cb77927a35c85230163c0cf6d3872382d79048b0fb79341493caa46f8e91498cb787d8b06aba4da17b2f921f2230e73f3d66385519794fff86a831b3a71d
2021-10-05 16:48:33 +02:00
..
bench scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
compat compat: remove glibc_compat.cpp 2021-09-10 11:18:58 +08:00
config
consensus consensus: use <cstdint> over <stdint.h> in amount.h 2021-09-30 07:42:01 +08:00
crc32c Update crc32c subtree 2021-09-29 14:10:29 +02:00
crypto [crypto] Fix K1/K2 use in ChaCha20-Poly1305 AEAD 2021-06-23 09:46:38 -07:00
index Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
init Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
interfaces [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
ipc Add ipc::Context and ipc::capnp::Context structs 2021-06-10 09:58:45 -05:00
leveldb
logging Make unexpected time type in BCLog::LogMsg() a compile-time error 2021-09-07 19:19:31 +02:00
node Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
policy [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
primitives [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
qt Merge bitcoin/bitcoin#22951: consensus: move amount.h into consensus 2021-10-05 09:43:23 +02:00
rpc Merge bitcoin/bitcoin#22951: consensus: move amount.h into consensus 2021-10-05 09:43:23 +02:00
script [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
secp256k1 Update secp256k1 subtree to latest upstream + adapt API 2021-07-14 14:43:45 -07:00
support Merge #20464: refactor: Treat CDataStream bytes as uint8_t 2021-02-01 15:17:28 +01:00
test Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
univalue Update univalue subtree 2020-11-19 15:48:24 +01:00
util Merge bitcoin/bitcoin#23179: sandbox: add newfstatat & copy_file_range to allowed filesystem syscalls 2021-10-05 11:35:18 +02:00
wallet Merge bitcoin/bitcoin#22951: consensus: move amount.h into consensus 2021-10-05 09:43:23 +02:00
zmq scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
.clang-format [tools] Allow argument/parameter bin packing in clang-format 2021-02-18 10:07:37 +00:00
.clang-tidy Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
addrdb.cpp scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
addrdb.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
addrman.cpp [style] Run changed files through clang formatter. 2021-09-28 22:21:10 -04:00
addrman.h [style] Run changed files through clang formatter. 2021-09-28 22:21:10 -04:00
addrman_impl.h [style] Run changed files through clang formatter. 2021-09-28 22:21:10 -04:00
arith_uint256.cpp
arith_uint256.h
attributes.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
banman.cpp Ignore banlist.dat 2021-07-30 11:21:51 +02:00
banman.h Ignore banlist.dat 2021-07-30 11:21:51 +02:00
base58.cpp refactor: replace sizeof(a)/sizeof(a[0]) by std::size (C++17) 2021-01-31 17:35:16 +01:00
base58.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
bech32.cpp Add references for the generator/constant used in Bech32(m) 2021-08-20 15:49:50 -04:00
bech32.h naming nits 2021-03-17 17:59:22 -07:00
bitcoin-cli-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-cli.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
bitcoin-tx-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-tx.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
bitcoin-util-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-util.cpp refactor: Pass grind args vector as const reference 2021-06-18 20:10:07 +02:00
bitcoin-wallet-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoin-wallet.cpp Remove unused OptionsCategory arg from AddCommand 2021-06-18 20:09:23 +02:00
bitcoind-res.rc windres: use PACKAGE_VERSION rather than building more version numbers 2021-08-17 16:54:47 +08:00
bitcoind.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
blockencodings.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
blockencodings.h Get rid of -Wthread-safety-precise warnings 2020-05-28 09:55:39 +03:00
blockfilter.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
blockfilter.h [indexes] Fix default [de]serialization of BlockFilter. 2020-05-26 17:27:15 -04:00
bloom.cpp bloom: cleanup includes 2021-09-29 09:48:36 +08:00
bloom.h bloom: cleanup includes 2021-09-29 09:48:36 +08:00
chain.cpp
chain.h chain: add BLOCK_ASSUMED_VALID for use with assumeutxo 2021-09-15 15:46:44 -04:00
chainparams.cpp doc: Remove un-actionable TODO from chainparams.cpp 2021-09-28 20:18:20 +02:00
chainparams.h net: distinguish default port per network 2021-07-09 11:19:36 +02:00
chainparamsbase.cpp test: Activate all regtest softforks at height 1, unless overridden 2021-09-16 18:53:04 +02:00
chainparamsbase.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
chainparamsseeds.h contrib, p2p: update I2P hardcoded seeds 2021-07-30 11:03:44 +02:00
checkqueue.h Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
clientversion.cpp wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
clientversion.h wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump 2021-08-16 16:04:47 +08:00
coins.cpp refactor: wrap CCoinsViewCursor in unique_ptr 2021-06-17 09:47:08 -04:00
coins.h refactor: wrap CCoinsViewCursor in unique_ptr 2021-06-17 09:47:08 -04:00
compat.h net: extend Sock with methods for robust send & read until terminator 2021-03-01 17:36:16 +01:00
compressor.cpp refactor: Use CPubKey vector constructor where possible 2021-05-04 06:53:32 +02:00
compressor.h compressor: use a prevector in compressed script serialization 2020-05-15 15:26:54 -07:00
core_io.h [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
core_memusage.h
core_read.cpp Replace use of locale dependent atoi(…) with locale-independent std::from_chars(…) (C++17) 2021-09-30 14:21:17 +00:00
core_write.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
cuckoocache.h doc: Use https URLs where possible 2021-01-04 12:23:16 +08:00
dbwrapper.cpp refactor: Use only one temporary buffer in CreateObfuscateKey 2021-05-04 06:53:37 +02:00
dbwrapper.h Merge #20464: refactor: Treat CDataStream bytes as uint8_t 2021-02-01 15:17:28 +01:00
deploymentinfo.cpp deploymentinfo: Add DeploymentName() 2021-06-30 08:19:12 +10:00
deploymentinfo.h deploymentinfo: Add DeploymentName() 2021-06-30 08:19:12 +10:00
deploymentstatus.cpp consensus/params: simplify ValidDeployment check to avoid gcc warning 2021-08-02 23:48:32 +10:00
deploymentstatus.h Use DeploymentEnabled to hide VB deployments 2021-07-01 20:20:52 +02:00
dummywallet.cpp Remove -rescan startup parameter 2021-09-30 12:06:27 +13:00
external_signer.cpp refactor: make ExternalSigner NetworkArg() and m_chain private 2021-06-16 10:48:58 +02:00
external_signer.h refactor: make ExternalSigner NetworkArg() and m_chain private 2021-06-16 10:48:58 +02:00
flatfile.cpp log: Move "Pre-allocating up to position 0x[...] in [...].dat" log message to debug category 2021-02-10 20:46:25 +00:00
flatfile.h Merge #18317: Serialization improvements step 6 (all except wallet/gui) 2020-05-20 07:30:29 -04:00
fs.cpp Merge bitcoin/bitcoin#20586: Fix Windows build with --enable-werror 2021-08-27 08:31:45 +02:00
fs.h Replace fs::absolute calls with AbsPathJoin calls 2021-01-15 22:48:15 +01:00
hash.cpp bloom: use Span instead of std::vector for insert and contains 2021-09-29 09:40:10 +08:00
hash.h Squashed 'src/secp256k1/' changes from 3967d96bf1..efad3506a8 2021-04-23 11:35:15 -07:00
httprpc.cpp Replace use of boost::trim use with locale-independent TrimString 2021-09-02 13:17:46 +08:00
httprpc.h refactor: replace util::Ref by std::any (C++17) 2021-03-29 23:29:42 +02:00
httpserver.cpp Merge bitcoin/bitcoin#20487: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) 2021-10-04 22:45:43 +02:00
httpserver.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
i2p.cpp net: do not connect to I2P hosts on port!=0 2021-07-09 11:19:37 +02:00
i2p.h i2p: use pointers to Sock to accommodate mocking 2021-03-16 13:59:18 +01:00
indirectmap.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
init.cpp Merge bitcoin/bitcoin#22951: consensus: move amount.h into consensus 2021-10-05 09:43:23 +02:00
init.h init: remove straggling boost thread_group code 2021-07-12 21:46:59 +08:00
key.cpp Stricter BIP32 decoding and test vector 5 2021-08-30 12:02:04 -04:00
key.h doc: Remove stale comment for CPrivKey 2021-09-16 21:16:39 +09:00
key_io.cpp Separate WitnessV1Taproot variant in CTxDestination 2021-05-24 12:14:16 -07:00
key_io.h Better error messages for invalid addresses 2021-01-24 02:44:53 +01:00
logging.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
logging.h Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
Makefile.am Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
Makefile.bench.include bench: add peer eviction protection benchmarks 2021-07-08 12:28:23 +02:00
Makefile.crc32c.include build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
Makefile.leveldb.include Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough 2021-07-05 08:59:38 +03:00
Makefile.qt.include Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
Makefile.qt_locale.include qt: Pre-splitoff translations update 2020-10-27 19:40:44 +01:00
Makefile.qttest.include Start using init makeNode, makeChain, etc methods 2021-08-17 03:05:15 -05:00
Makefile.test.include fuzz: Move all addrman fuzz targets to one file 2021-09-21 10:09:56 +02:00
Makefile.test_fuzz.include build: compile libnatpmp with -DNATPMP_STATICLIB on Windows 2021-03-04 12:34:46 +08:00
Makefile.test_util.include move-only: unittest: add test/util/chainstate.h 2021-09-15 15:46:48 -04:00
mapport.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
mapport.h net: Add -natpmp command line option 2021-01-07 18:07:09 +02:00
memusage.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
merkleblock.cpp doc: fix various typos 2021-01-04 12:31:31 +08:00
merkleblock.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
miner.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
miner.h miner: Pass in chainman to RegenerateCommitments 2021-05-27 13:50:11 -04:00
net.cpp Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
net.h Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
net_permissions.cpp p2p: pass strings to NetPermissions::TryParse functions by const ref 2021-05-19 19:41:05 +02:00
net_permissions.h Rate limit the processing of incoming addr messages 2021-07-15 12:52:38 -07:00
net_processing.cpp Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details 2021-10-05 16:48:33 +02:00
net_processing.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
net_types.cpp MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
net_types.h MOVEONLY: Expose BanMapToJson / BanMapFromJson 2021-09-03 05:21:58 -04:00
netaddress.cpp scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
netaddress.h scripted-diff: Rename CAddrMan to AddrMan 2021-09-28 22:21:10 -04:00
netbase.cpp Cleanup headers after #20788 2021-09-11 10:47:02 +03:00
netbase.h doc: fixup -Wdocumentation issues 2021-04-06 14:50:17 +08:00
netmessagemaker.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
noui.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
noui.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
outputtype.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
outputtype.h make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
pow.cpp
pow.h
prevector.h prevector: Avoid unnamed struct, which is a GNU extension 2020-04-30 18:02:03 +08:00
protocol.cpp refactor: Replace memset calls with array initialization 2021-05-13 12:42:21 +01:00
protocol.h doc: Remove incorrect INIT_PROTO_VERSION from nTime comment 2021-08-23 18:53:34 +02:00
psbt.cpp Make GetInputUTXO safer: verify non-witness UTXO match 2021-06-12 12:25:28 -07:00
psbt.h Construct and use PrecomputedTransactionData in PSBT signing 2021-06-12 12:25:28 -07:00
pubkey.cpp Merge bitcoin/bitcoin#22836: Stricter BIP32 decoding and test vector 5 2021-09-02 10:41:16 +08:00
pubkey.h Consolidate XOnlyPubKey lookup hack 2021-08-23 21:38:34 -04:00
random.cpp refactor: Replace &foo[0] with foo.data() 2021-05-04 06:55:31 +02:00
random.h Add templated GetRandomDuration<> 2020-04-30 09:19:14 -04:00
randomenv.cpp build: remove support for weak linking getauxval() 2021-09-24 15:40:04 +08:00
randomenv.h
rest.cpp Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough 2021-07-05 08:59:38 +03:00
reverse_iterator.h
scheduler.cpp Add syscall sandboxing (seccomp-bpf) 2021-10-01 13:51:10 +00:00
scheduler.h refactor: remove boost::thread_group usage 2021-01-29 15:39:44 +08:00
serialize.h refactor: Switch serialize to uint8_t (1/n) 2021-05-31 14:56:17 +02:00
shutdown.cpp move-only: Move AbortNode to shutdown 2021-04-04 18:08:36 +02:00
shutdown.h move-only: Move AbortNode to shutdown 2021-04-04 18:08:36 +02:00
signet.cpp Enable clang-tidy bugprone-argument-comment and fix violations 2021-09-07 09:11:10 +02:00
signet.h scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
span.h Merge #19387: span: update constructors to match c++20 draft spec and add lifetimebound attribute 2020-11-25 15:18:33 +01:00
streams.h streams: Accept URef obj for VectorReader unserialize 2021-05-05 20:19:03 +02:00
sync.cpp log: Avoid broken DEBUG_LOCKORDER log 2021-09-29 18:46:30 +02:00
sync.h sync: inline lock contention logging macro to fix time duration 2021-09-06 23:43:51 +02:00
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
timedata.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
timedata.h
tinyformat.h Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough 2021-07-05 08:59:38 +03:00
torcontrol.cpp Merge bitcoin/bitcoin#20487: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) 2021-10-04 22:45:43 +02:00
torcontrol.h tests: Add fuzzing harness for TorController 2021-03-02 12:21:32 +00:00
txdb.cpp scripted-diff: Rename overloaded int GetArg to GetIntArg 2021-09-27 06:57:20 -04:00
txdb.h Remove txindex migration code 2021-08-20 16:59:41 +02:00
txmempool.cpp Use C++11 member initializer in CTxMemPoolEntry 2021-09-21 16:04:27 +02:00
txmempool.h [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
txorphanage.cpp scripted-diff: Update txorphanage naming convention 2021-02-27 01:08:09 +10:00
txorphanage.h [net processing] Add Orphanage empty consistency check 2021-07-20 13:12:42 +01:00
txrequest.cpp doc: Fix typos from codespell lint 2021-04-07 19:26:25 +01:00
txrequest.h Report and verify expirations 2020-10-12 12:14:53 -07:00
uint256.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
uint256.h Make XOnlyPubKey act like byte container 2021-05-24 12:14:16 -07:00
undo.h scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
validation.cpp [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
validation.h [MOVEONLY] consensus: move amount.h into consensus 2021-09-30 07:41:57 +08:00
validationinterface.cpp Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
validationinterface.h Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas 2020-09-22 11:34:30 -04:00
version.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
versionbits.cpp [refactor] Move ComputeBlockVersion into VersionBitsCache 2021-06-30 08:19:12 +10:00
versionbits.h [refactor] Move ComputeBlockVersion into VersionBitsCache 2021-06-30 08:19:12 +10:00
walletinitinterface.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
warnings.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
warnings.h scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00