Skip to main content

history_document

Function history_document 

Source
pub fn history_document(passes: &[Pass], only: Option<usize>) -> Value
Expand description

The full prune log, for devp history --json and devp history --export.

The whole log, not a page of it: this is the document the --export file holds and the one an assistant is pointed at, and both of those want every pass. The compact text report is where the trimming lives.

detail: false on a pass is the honest form of a gap. Passes older than constants::PRUNE_LOG_STARTS_AT have their totals and no directory list, and a consumer must be able to tell “this pass deleted nothing” from “nobody wrote down what this pass deleted” — an empty directories array on its own says the first.

only narrows the document to one pass without renumbering it: --pass 3 --json carries "pass": 3, the same number the text report and --pass itself use.