mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-02-03 08:42:50 +00:00
560df57ac7
* Avoid fetching contracts while creating a checkpoint * Use enum for state kind and cache ipld status * Avoid fetching block twice while finalizing a staged diff IPLDBlock * Create checkpoints at fixed block numbers and refactor checkpointing code * Avoid calling block handler until start block is reached * Use delete while finalizing staged diff IPLDBlocks * Add a check to ensure hooks job is created only once * Avoid check for initial state while creating a checkpoint
26 lines
723 B
TypeScript
26 lines
723 B
TypeScript
//
|
|
// Copyright 2021 Vulcanize, Inc.
|
|
//
|
|
|
|
export const MAX_REORG_DEPTH = 16;
|
|
|
|
export const QUEUE_BLOCK_PROCESSING = 'block-processing';
|
|
export const QUEUE_EVENT_PROCESSING = 'event-processing';
|
|
export const QUEUE_CHAIN_PRUNING = 'chain-pruning';
|
|
export const QUEUE_BLOCK_CHECKPOINT = 'block-checkpoint';
|
|
export const QUEUE_HOOKS = 'hooks';
|
|
export const QUEUE_IPFS = 'ipfs';
|
|
|
|
export const JOB_KIND_INDEX = 'index';
|
|
export const JOB_KIND_PRUNE = 'prune';
|
|
|
|
export const JOB_KIND_EVENTS = 'events';
|
|
export const JOB_KIND_CONTRACT = 'contract';
|
|
|
|
export const DEFAULT_CONFIG_PATH = 'environments/local.toml';
|
|
|
|
export const UNKNOWN_EVENT_NAME = '__unknown__';
|
|
|
|
export const KIND_ACTIVE = 'active';
|
|
export const KIND_LAZY = 'lazy';
|