diff options
author | fanquake <fanquake@gmail.com> | 2023-09-15 14:05:55 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-09-15 14:27:20 +0100 |
commit | 5c7cdda992442d8b1dce5bc4b239e8645c507a3c (patch) | |
tree | d4c5cd0d563c9fb0b72069e6ca1f36c186d8c1b7 /src/addrdb.cpp | |
parent | 717a4d89449f607c5203138b128e1e30b4493f2c (diff) | |
parent | fb6a2ab63e310d8b600352ef41aab6dafccfbff0 (diff) |
Merge bitcoin/bitcoin#28473: refactor: Serialization parameter cleanups
fb6a2ab63e310d8b600352ef41aab6dafccfbff0 scripted-diff: use SER_PARAMS_OPFUNC (Anthony Towns)
5e5c8f86b60a8018e8801fb44bbe56ce97d9deef serialize: add SER_PARAMS_OPFUNC (Anthony Towns)
33203f59b482bddfe0bbe7d497cb8731ce8334a4 serialize: specify type for ParamsWrapper not ref (Anthony Towns)
bf147bfffa1afb11721f30e83eec1fa829f64d5f serialize: move ser_action functions out of global namespace (Anthony Towns)
Pull request description:
Cleanups after #25284:
* ser_action namespacing - https://github.com/bitcoin/bitcoin/pull/25284#discussion_r1316189977
* make reference implicit - https://github.com/bitcoin/bitcoin/pull/25284#discussion_r1316277030
* function notation - https://github.com/bitcoin/bitcoin/pull/25284#issuecomment-1710714821
ACKs for top commit:
MarcoFalke:
lgtm ACK fb6a2ab63e310d8b600352ef41aab6dafccfbff0 💨
TheCharlatan:
ACK fb6a2ab63e310d8b600352ef41aab6dafccfbff0
Tree-SHA512: aacca2ee9cfec360ade6b394606e13d1dfe05bc29c5fbdd48a4e6992bd420312d4ed0d32218d95c560646af326e9977728dc2e759990636298e326947f6f9526
Diffstat (limited to 'src/addrdb.cpp')
-rw-r--r-- | src/addrdb.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 50f576624c..8b85b77e2b 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -216,14 +216,14 @@ util::Result<std::unique_ptr<AddrMan>> LoadAddrman(const NetGroupManager& netgro void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& anchors) { LOG_TIME_SECONDS(strprintf("Flush %d outbound block-relay-only peer addresses to anchors.dat", anchors.size())); - SerializeFileDB("anchors", anchors_db_path, WithParams(CAddress::V2_DISK, anchors)); + SerializeFileDB("anchors", anchors_db_path, CAddress::V2_DISK(anchors)); } std::vector<CAddress> ReadAnchors(const fs::path& anchors_db_path) { std::vector<CAddress> anchors; try { - DeserializeFileDB(anchors_db_path, WithParams(CAddress::V2_DISK, anchors)); + DeserializeFileDB(anchors_db_path, CAddress::V2_DISK(anchors)); LogPrintf("Loaded %i addresses from %s\n", anchors.size(), fs::quoted(fs::PathToString(anchors_db_path.filename()))); } catch (const std::exception&) { anchors.clear(); |