Add flags.
This commit is contained in:
parent
ab7e807afe
commit
352b6d0298
@ -273,13 +273,15 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
p := statediff.Config{
|
p := statediff.Config{
|
||||||
IndexerConfig: indexerConfig,
|
IndexerConfig: indexerConfig,
|
||||||
ID: nodeID,
|
ID: nodeID,
|
||||||
ClientName: clientName,
|
ClientName: clientName,
|
||||||
Context: context.Background(),
|
Context: context.Background(),
|
||||||
EnableWriteLoop: ctx.Bool(utils.StateDiffWritingFlag.Name),
|
EnableWriteLoop: ctx.Bool(utils.StateDiffWritingFlag.Name),
|
||||||
NumWorkers: ctx.Uint(utils.StateDiffWorkersFlag.Name),
|
NumWorkers: ctx.Uint(utils.StateDiffWorkersFlag.Name),
|
||||||
WaitForSync: ctx.Bool(utils.StateDiffWaitForSync.Name),
|
WaitForSync: ctx.Bool(utils.StateDiffWaitForSync.Name),
|
||||||
|
BackfillCheckPastBlocks: ctx.Uint64(utils.StateDiffBackfillCheckPastBlocks.Name),
|
||||||
|
BackfillMaxHeadGap: ctx.Uint64(utils.StateDiffBackfillMaxHeadGap.Name),
|
||||||
}
|
}
|
||||||
utils.RegisterStateDiffService(stack, eth, &cfg.Eth, p, backend)
|
utils.RegisterStateDiffService(stack, eth, &cfg.Eth, p, backend)
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,8 @@ var (
|
|||||||
utils.StateDiffUpsert,
|
utils.StateDiffUpsert,
|
||||||
utils.StateDiffLogStatements,
|
utils.StateDiffLogStatements,
|
||||||
utils.StateDiffCopyFrom,
|
utils.StateDiffCopyFrom,
|
||||||
|
utils.StateDiffBackfillCheckPastBlocks,
|
||||||
|
utils.StateDiffBackfillMaxHeadGap,
|
||||||
configFileFlag,
|
configFileFlag,
|
||||||
}, utils.NetworkFlags, utils.DatabasePathFlags)
|
}, utils.NetworkFlags, utils.DatabasePathFlags)
|
||||||
|
|
||||||
|
@ -1120,6 +1120,16 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
|
|||||||
Name: "statediff.waitforsync",
|
Name: "statediff.waitforsync",
|
||||||
Usage: "Should the statediff service wait for geth to catch up to the head of the chain?",
|
Usage: "Should the statediff service wait for geth to catch up to the head of the chain?",
|
||||||
}
|
}
|
||||||
|
StateDiffBackfillCheckPastBlocks = &cli.Uint64Flag{
|
||||||
|
Name: "statediff.backfillcheckpastblocks",
|
||||||
|
Usage: "The number of blocks behind the startup statediff position to check (and fill) for gaps when head tracking.",
|
||||||
|
Value: 7200,
|
||||||
|
}
|
||||||
|
StateDiffBackfillMaxHeadGap = &cli.Uint64Flag{
|
||||||
|
Name: "statediff.backfillmaxheadgap",
|
||||||
|
Usage: "The maximum gap between the startup statediff and startup head positions that can be backfilled.",
|
||||||
|
Value: 7200,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user