mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 16:54:08 +00:00
Add a flag to enable state creation (#222)
* Add a flag to enable state creation * Update flag in mock config for testing
This commit is contained in:
@@ -9,13 +9,13 @@
|
||||
# Checkpoint interval in number of blocks.
|
||||
checkpointInterval = 2000
|
||||
|
||||
# Enable state creation
|
||||
# CAUTION: Disable only if state creation is not desired or can be filled subsequently
|
||||
enableState = true
|
||||
|
||||
{{#if (subgraphPath)}}
|
||||
subgraphPath = "{{subgraphPath}}"
|
||||
|
||||
# Disable creation of state from subgraph entity updates
|
||||
# CAUTION: Disable only if subgraph state is not desired or can be filled subsequently
|
||||
disableSubgraphState = false
|
||||
|
||||
# Interval to restart wasm instance periodically
|
||||
wasmRestartBlocksInterval = 20
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@ export const main = async (): Promise<any> => {
|
||||
await graphWatcher.init();
|
||||
|
||||
if (argv.state) {
|
||||
assert(config.server.enableState, 'State creation disabled');
|
||||
await fillState(indexer, graphDb, graphWatcher.dataSources, argv);
|
||||
|
||||
return;
|
||||
}
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user