diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-09 08:09:31 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-09-09 08:09:39 +0200 |
commit | 896649996bdaa80300fa20027a9789558233268d (patch) | |
tree | bd7914c3e5fa7aa7a7eee66cff32ae242997bc03 /src/addrdb.cpp | |
parent | 8805e0666318f52bc9c29a104fb257268964667a (diff) | |
parent | fade9a1a4db71241ccad03fdacfb626453952963 (diff) | |
download | bitcoin-896649996bdaa80300fa20027a9789558233268d.tar.xz |
Merge bitcoin/bitcoin#22915: Remove confusing CAddrDB
fade9a1a4db71241ccad03fdacfb626453952963 Remove confusing CAddrDB (MarcoFalke)
fa7f77b7d1709bf35808fced0d67b6e97b784d63 Fix addrdb includes (MarcoFalke)
fa3f5d0dae2381038439b91ef2af85ec277c8294 Move addrman includes from .h to .cpp (MarcoFalke)
Pull request description:
Split out from #22762 to avoid having to carry it around in (an)other rebase(s)
ACKs for top commit:
ryanofsky:
Code review ACK fade9a1a4db71241ccad03fdacfb626453952963
lsilva01:
Code Review ACK https://github.com/bitcoin/bitcoin/pull/22915/commits/fade9a1a4db71241ccad03fdacfb626453952963
Tree-SHA512: 7615fb0b6235d0c1e6f8cd6263dd18c4d95890567c2b797fe6fce6cb12cc85ce6eacbe07dbb6d81b05d179ef03b42edfd61c940e35a1044ce6d363b54c2dae5c
Diffstat (limited to 'src/addrdb.cpp')
-rw-r--r-- | src/addrdb.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 345dbdfb16..856f318961 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -170,22 +170,19 @@ bool CBanDB::Read(banmap_t& banSet) return true; } -CAddrDB::CAddrDB() -{ - pathAddr = gArgs.GetDataDirNet() / "peers.dat"; -} - -bool CAddrDB::Write(const CAddrMan& addr) +bool DumpPeerAddresses(const ArgsManager& args, const CAddrMan& addr) { + const auto pathAddr = args.GetDataDirNet() / "peers.dat"; return SerializeFileDB("peers", pathAddr, addr, CLIENT_VERSION); } -bool CAddrDB::Read(CAddrMan& addr) +bool ReadPeerAddresses(const ArgsManager& args, CAddrMan& addr) { + const auto pathAddr = args.GetDataDirNet() / "peers.dat"; return DeserializeFileDB(pathAddr, addr, CLIENT_VERSION); } -bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers) +bool ReadFromStream(CAddrMan& addr, CDataStream& ssPeers) { return DeserializeDB(ssPeers, addr, false); } |