Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add separate config to disable balance pruning #354

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion configuration/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,16 @@ type DataConfiguration struct {
// the results of a check:data run.
ResultsOutputFile string `json:"results_output_file"`

// PruningDisabled is a bolean that indicates storage pruning should
// PruningDisabled is a boolean that indicates storage pruning should
// not be attempted. This should really only ever be set to true if you
// wish to use `start_index` at a later point to restart from some
// previously synced block.
PruningDisabled bool `json:"pruning_disabled"`

// PruningBalanceDisabled is a boolean that indicates balance pruning
// should not be attempted.
PruningBalanceDisabled bool `json:"pruning_balance_disabled"`

// PruningFrequency is the frequency (in seconds) that we attempt
// to prune blocks. If not populated, we use the default value
// provided in the `statefulsyncer` package.
Expand Down
1 change: 1 addition & 0 deletions examples/configuration/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"status_port": 9090,
"results_output_file": "",
"pruning_disabled": false,
"pruning_balance_disabled": false,
"initial_balance_fetch_disabled": false
},
"perf": null
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/reconciler_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (h *ReconcilerHelper) PruneBalances(
currency *types.Currency,
index int64,
) error {
if h.config.Data.PruningDisabled {
if h.config.Data.PruningBalanceDisabled {
return nil
}

Expand Down