mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Use serialization parameters for CAddress serialization
This also cleans up the addrman (de)serialization code paths to only allow `Disk` serialization. Some unit tests previously forced a `Network` serialization, which does not make sense, because Bitcoin Core in production will always `Disk` serialize. This cleanup idea was suggested by Pieter Wuille and implemented by Anthony Towns. Co-authored-by: Pieter Wuille <pieter@wuille.net> Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
@@ -16,12 +16,13 @@
|
||||
class ArgsManager;
|
||||
class AddrMan;
|
||||
class CAddress;
|
||||
class CDataStream;
|
||||
class DataStream;
|
||||
class NetGroupManager;
|
||||
|
||||
bool DumpPeerAddresses(const ArgsManager& args, const AddrMan& addr);
|
||||
/** Only used by tests. */
|
||||
void ReadFromStream(AddrMan& addr, CDataStream& ssPeers);
|
||||
void ReadFromStream(AddrMan& addr, DataStream& ssPeers);
|
||||
|
||||
bool DumpPeerAddresses(const ArgsManager& args, const AddrMan& addr);
|
||||
|
||||
/** Access to the banlist database (banlist.json) */
|
||||
class CBanDB
|
||||
|
||||
Reference in New Issue
Block a user