v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust
src/node/mempool_persist.cpp
Before: src/node/mempool_persist.cpp · After: src/node/mempool_persist.cpp
File metadata
index dcb05267eddabc6c2f9905b4de4236bb5b1035b8..fddf4f29751b16d0fadd8ee6bf1bbbbe5ce3a93b 100644
Download original patch · Release notes
Diff rows 1–12 of 12. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/node/mempool_persist.cpp
CHANGED
|
@@ -196,7 +196,11 @@ bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, FopenFn mock
|
|
| 196 |
for (const auto& i : vinfo) {
|
| 197 |
file << TX_WITH_WITNESS(*(i.tx));
|
| 198 |
file << int64_t{count_seconds(i.m_time)};
|
| 199 |
-
file << int64_t{i.nFeeDelta};
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
mapDeltas.erase(i.tx->GetHash());
|
| 201 |
}
|
| 202 |
|
|
|
|
| 196 |
for (const auto& i : vinfo) {
|
| 197 |
file << TX_WITH_WITNESS(*(i.tx));
|
| 198 |
file << int64_t{count_seconds(i.m_time)};
|
| 199 |
+
// Modified fees include the immutable admission-time dust deficit.
|
| 200 |
+
// Persist only operator deltas; admission recomputes its own deficit
|
| 201 |
+
// from the live dust floor/rate when these transactions are loaded.
|
| 202 |
+
const auto delta = mapDeltas.find(i.tx->GetHash());
|
| 203 |
+
file << int64_t{delta == mapDeltas.end() ? 0 : delta->second};
|
| 204 |
mapDeltas.erase(i.tx->GetHash());
|
| 205 |
}
|
| 206 |
|