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:
prathamesh0
2022-11-10 16:56:06 +05:30
committed by GitHub
parent 8d3c68873b
commit 861420a10f
12 changed files with 58 additions and 14 deletions
@@ -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}}