Skip to content

Commit 7bb7304

Browse files
authored
Merge pull request #362 from GeekArthur/pruningFlag
Decouple pruning configurations
2 parents 03cf522 + 27df049 commit 7bb7304

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

configuration/types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,15 @@ type DataConfiguration struct {
321321
// the results of a check:data run.
322322
ResultsOutputFile string `json:"results_output_file"`
323323

324-
// PruningDisabled is a bolean that indicates storage pruning should
324+
// PruningBlockDisabled is a boolean that indicates storage pruning should
325325
// not be attempted. This should really only ever be set to true if you
326326
// wish to use `start_index` at a later point to restart from some
327327
// previously synced block.
328-
PruningDisabled bool `json:"pruning_disabled"`
328+
PruningBlockDisabled bool `json:"pruning_block_disabled"`
329+
330+
// PruningBalanceDisabled is a boolean that indicates balance pruning
331+
// should not be attempted.
332+
PruningBalanceDisabled bool `json:"pruning_balance_disabled"`
329333

330334
// PruningFrequency is the frequency (in seconds) that we attempt
331335
// to prune blocks. If not populated, we use the default value

examples/configuration/default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"coin_tracking_disabled": false,
3939
"status_port": 9090,
4040
"results_output_file": "",
41-
"pruning_disabled": false,
41+
"pruning_block_disabled": false,
42+
"pruning_balance_disabled": false,
4243
"initial_balance_fetch_disabled": false
4344
},
4445
"perf": null

pkg/processor/reconciler_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (h *ReconcilerHelper) PruneBalances(
154154
currency *types.Currency,
155155
index int64,
156156
) error {
157-
if h.config.Data.PruningDisabled {
157+
if h.config.Data.PruningBalanceDisabled {
158158
return nil
159159
}
160160

pkg/tester/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func (t *DataTester) StartSyncing(
443443
func (t *DataTester) StartPruning(
444444
ctx context.Context,
445445
) error {
446-
if t.config.Data.PruningDisabled {
446+
if t.config.Data.PruningBlockDisabled {
447447
return nil
448448
}
449449

0 commit comments

Comments
 (0)