Commit 248ff79b authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] allow to disable c_index trimming when needed (for dumps typically)

parent 8673cb03
......@@ -74,6 +74,7 @@ export const ExecuteCommand = () => {
.option('--isolate', 'Avoid the node to send peering or status informations to the network')
.option('--forksize <size>', 'Maximum size of fork window', parseInt)
.option('--notrim', 'Disable the INDEX trimming.')
.option('--notrimc', 'Disable the C_INDEX trimming specifically.')
.option('--memory', 'Memory mode')
......@@ -17,6 +17,7 @@ export interface ProgramOptions {
mdb?: string
home?: string
notrim?: boolean
notrimc?: boolean // Specificaly disable for c_index
nosbx?: boolean
nopeers?: boolean
nop2p?: boolean
......@@ -1089,7 +1089,9 @@ export class FileDAL {
await this.bindexDAL.trimBlocks(maxNumber)
await this.iindexDAL.trimRecords(maxNumber)
await this.mindexDAL.trimRecords(maxNumber)
await this.cindexDAL.trimExpiredCerts(maxNumber)
if (!cliprogram.notrimc) {
await this.cindexDAL.trimExpiredCerts(maxNumber)
await this.sindexDAL.trimConsumedSource(maxNumber)
await this.dividendDAL.trimConsumedUDs(maxNumber)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment