diff options
author | fanquake <fanquake@gmail.com> | 2022-07-22 08:36:00 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-07-22 08:40:36 +0100 |
commit | 510ac41eac068d58fd0cedf2e8f99f8c7ef533aa (patch) | |
tree | 338c49011a4b0a6d463c93579cc0baddda1c936a /src/wallet | |
parent | 86133df7a2be80203fa439bf344e1f45dc2be41d (diff) | |
parent | faf9accd662974a69390213fee1b5c6237846b42 (diff) | |
download | bitcoin-510ac41eac068d58fd0cedf2e8f99f8c7ef533aa.tar.xz |
Merge bitcoin/bitcoin#25331: Add HashWriter without ser-type and ser-version and use it where possible
faf9accd662974a69390213fee1b5c6237846b42 Use HashWriter where possible (MacroFake)
faa5425629d35708326b255570c51139aef0c8c4 Add HashWriter without ser-type and ser-version (MacroFake)
Pull request description:
This was done in the context of https://github.com/bitcoin/bitcoin/pull/25284 , but I think it also makes sense standalone.
The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version.
So do this here for `HashWriter`. `CHashWriter` remains in places where it is not yet possible.
ACKs for top commit:
sipa:
utACK faf9accd662974a69390213fee1b5c6237846b42
Empact:
utACK https://github.com/bitcoin/bitcoin/pull/25331/commits/faf9accd662974a69390213fee1b5c6237846b42
Tree-SHA512: 544cc712436e49f6e608120bcd3ddc5ea72dd236554ce30fb6cfff34a92d7e67b6e6527336ad0f5b6365e2b2884f4c6508aef775953ccd9312f17752729703f2
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/dump.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/dump.cpp b/src/wallet/dump.cpp index d80c3e25b0..f7fee443d0 100644 --- a/src/wallet/dump.cpp +++ b/src/wallet/dump.cpp @@ -41,7 +41,7 @@ bool DumpWallet(const ArgsManager& args, CWallet& wallet, bilingual_str& error) return false; } - CHashWriter hasher(0, 0); + HashWriter hasher{}; WalletDatabase& db = wallet.GetDatabase(); std::unique_ptr<DatabaseBatch> batch = db.MakeBatch(); @@ -132,7 +132,7 @@ bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs:: std::ifstream dump_file{dump_path}; // Compute the checksum - CHashWriter hasher(0, 0); + HashWriter hasher{}; uint256 checksum; // Check the magic and version |