diff options
author | fanquake <fanquake@gmail.com> | 2022-07-20 09:13:00 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-07-20 09:32:11 +0100 |
commit | 895937edb2cca3046640dc016827a216e0b6d1c1 (patch) | |
tree | c4be27b6b5afa63db18aece924ae2afb7ec0f626 /src/validation.cpp | |
parent | 0897b189e4242321cd03339e7dde5c4d963d0e48 (diff) | |
parent | facc2fa7b8a218a0df6a19772e1641ea68dda2e3 (diff) | |
download | bitcoin-895937edb2cca3046640dc016827a216e0b6d1c1.tar.xz |
Merge bitcoin/bitcoin#25285: Add AutoFile without ser-type and ser-version and use it where possible
facc2fa7b8a218a0df6a19772e1641ea68dda2e3 Use AutoFile where possible (MacroFake)
6666803c897e4ad27b45cb74e3a9aa74a335f1bf streams: Add AutoFile 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 `AutoFile`. `CAutoFile` remains in places where it is not yet possible.
ACKs for top commit:
laanwj:
Code review ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3
fanquake:
ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3
Tree-SHA512: d82d024d55af57565ac53d9d1517afafc12b46964effba0332de62a6c77869356fa77f89e6d4834438fff44c45b64fccdf5a1358bfea03e28dfe55013b3c099d
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index c46eb36e5c..9b39350fed 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4721,7 +4721,7 @@ const AssumeutxoData* ExpectedAssumeutxo( } bool ChainstateManager::ActivateSnapshot( - CAutoFile& coins_file, + AutoFile& coins_file, const SnapshotMetadata& metadata, bool in_memory) { @@ -4816,7 +4816,7 @@ static void FlushSnapshotToDisk(CCoinsViewCache& coins_cache, bool snapshot_load bool ChainstateManager::PopulateAndValidateSnapshot( CChainState& snapshot_chainstate, - CAutoFile& coins_file, + AutoFile& coins_file, const SnapshotMetadata& metadata) { // It's okay to release cs_main before we're done using `coins_cache` because we know |