6#ifndef BITCOIN_ADDRDB_H
7#define BITCOIN_ADDRDB_H
46 uint8_t ban_reason = 2;
47 READWRITE(obj.nVersion, obj.nCreateTime, obj.nBanUntil, ban_reason);
82 const std::vector<CAddress> &anchors);
std::vector< CAddress > ReadAnchors(const CChainParams &chainParams, const fs::path &anchors_db_path)
Read the anchor IP address database (anchors.dat)
util::Result< std::unique_ptr< AddrMan > > LoadAddrman(const CChainParams &chainparams, const std::vector< bool > &asmap, const ArgsManager &args)
Returns an error string on failure.
void ReadFromStream(const CChainParams &chainParams, AddrMan &addr, CDataStream &ssPeers)
Only used by tests.
bool DumpPeerAddresses(const CChainParams &chainParams, const ArgsManager &args, const AddrMan &addr)
void DumpAnchors(const CChainParams &chainParams, const fs::path &anchors_db_path, const std::vector< CAddress > &anchors)
Dump the anchor IP address database (anchors.dat)
Stochastic address manager.
A CService with information about it as peer.
Access to the banlist database (banlist.dat)
bool Write(const banmap_t &banSet)
const fs::path m_ban_list_path
CBanDB(fs::path ban_list_path, const CChainParams &_chainParams)
bool Read(banmap_t &banSet)
const CChainParams & chainParams
static const int CURRENT_VERSION
CBanEntry(int64_t nCreateTimeIn)
SERIALIZE_METHODS(CBanEntry, obj)
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Double ended buffer combining vector and stream-like interfaces.
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
std::map< CSubNet, CBanEntry > banmap_t