aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2023-09-07 19:16:57 +1000
committerAnthony Towns <aj@erisian.com.au>2023-11-14 08:45:30 +1000
commit6e9e4e6130797b721c8df1eabaf46ec25ebb6abe (patch)
tree6444c337cd23d1e6aabedf229a9efb1583fb7351 /src/kernel
parent5800c558eb5efb4839ed00d6967e43306d68e1c3 (diff)
downloadbitcoin-6e9e4e6130797b721c8df1eabaf46ec25ebb6abe.tar.xz
Use ParamsWrapper for witness serialization
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/mempool_persist.cpp8
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());