mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 16:59:26 +00:00
rjl493456442 pointed out that the cleared figure logged at the end of `geth db prune-history` only counted the body/receipt flat-file delta via prunableFreezerSize() and silently dropped the tx-index work done just before TruncateTail. Anyone reading the log line saw a number that under-reported the actual on-disk savings. PruneTransactionIndex now returns the logical bytes deleted (sum of key + value lengths for each removed entry) by accumulating during the existing DeleteAllTxLookupEntries iteration. cmd/geth folds that into the StorageSize total before logging. The figure is uncompacted — the KV store doesn't expose per-prefix on-disk usage without a full compaction sweep — but it's the only signal available without changing the prune sequence, and it matches the granularity rjl asked for. Existing rawdb test (TestPruneTransactionIndex) is unchanged; Go's untyped-discard semantics keep it compiling against the new signature. |
||
|---|---|---|
| .. | ||
| testdata | ||
| accountcmd.go | ||
| accountcmd_test.go | ||
| attach_test.go | ||
| bintrie_convert.go | ||
| bintrie_convert_test.go | ||
| chaincmd.go | ||
| chaincmd_test.go | ||
| config.go | ||
| consolecmd.go | ||
| consolecmd_test.go | ||
| dbcmd.go | ||
| exportcmd_test.go | ||
| genesis_test.go | ||
| logging_test.go | ||
| logtestcmd_active.go | ||
| logtestcmd_inactive.go | ||
| main.go | ||
| misccmd.go | ||
| run_test.go | ||
| snapshot.go | ||