diff options
author | fanquake <fanquake@gmail.com> | 2023-11-15 14:59:54 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-11-15 15:16:19 +0000 |
commit | 108462139b652b62c8461fc264f25b3eeceeaf92 (patch) | |
tree | 6b912b7220303ae7e40773ca558dcf2808f6df54 /src/kernel/mempool_persist.cpp | |
parent | a73715e5a48c9651720f45a43e4ac5be204201c4 (diff) | |
parent | a0c254c13a3ef21e257cca3493446c632b636b15 (diff) |
Merge bitcoin/bitcoin#28438: Use serialization parameters for CTransaction
a0c254c13a3ef21e257cca3493446c632b636b15 Drop CHashWriter (Anthony Towns)
c94f7e5b1cd1ddff2a7d95cfad5a83c9dfa526be Drop OverrideStream (Anthony Towns)
6e9e4e6130797b721c8df1eabaf46ec25ebb6abe Use ParamsWrapper for witness serialization (Anthony Towns)
Pull request description:
Choose whether witness is included in transaction serialization via serialization parameter rather than the stream version. See #25284 and #19477 for previous context.
ACKs for top commit:
maflcko:
re-ACK a0c254c13a3ef21e257cca3493446c632b636b15 🐜
theuni:
ACK a0c254c13a3ef21e257cca3493446c632b636b15
Tree-SHA512: 8fd5cadfd84c5128e36c34a51fb94fdccd956280e7f65b7d73c512d6a9cdb53cdd3649de99ffab5322bd34be26cb95ab4eb05932b3b9de9c11d85743f50dcb13
Diffstat (limited to 'src/kernel/mempool_persist.cpp')
-rw-r--r-- | src/kernel/mempool_persist.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/mempool_persist.cpp b/src/kernel/mempool_persist.cpp index 4087308d1a..0808d42452 100644 --- a/src/kernel/mempool_persist.cpp +++ b/src/kernel/mempool_persist.cpp @@ -42,7 +42,7 @@ bool LoadMempool(CTxMemPool& pool, const fs::path& load_path, Chainstate& active { if (load_path.empty()) return false; - CAutoFile file{opts.mockable_fopen_function(load_path, "rb"), CLIENT_VERSION}; + AutoFile file{opts.mockable_fopen_function(load_path, "rb")}; if (file.IsNull()) { LogPrintf("Failed to open mempool file from disk. Continuing anyway.\n"); return false; @@ -74,7 +74,7 @@ bool LoadMempool(CTxMemPool& pool, const fs::path& load_path, Chainstate& active CTransactionRef tx; int64_t nTime; int64_t nFeeDelta; - file >> tx; + file >> TX_WITH_WITNESS(tx); file >> nTime; file >> nFeeDelta; @@ -158,7 +158,7 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock auto mid = SteadyClock::now(); - CAutoFile file{mockable_fopen_function(dump_path + ".new", "wb"), CLIENT_VERSION}; + AutoFile file{mockable_fopen_function(dump_path + ".new", "wb")}; if (file.IsNull()) { return false; } @@ -176,7 +176,7 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock file << (uint64_t)vinfo.size(); for (const auto& i : vinfo) { - file << *(i.tx); + file << TX_WITH_WITNESS(*(i.tx)); file << int64_t{count_seconds(i.m_time)}; file << int64_t{i.nFeeDelta}; mapDeltas.erase(i.tx->GetHash()); |