Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BlockFailedExecutionBackoff time.Duration DedupExecutedTxns bool HashCalcStep int64 }
Config contains configuration attributes for an event processor.
type EventProcessor ¶
EventProcessor processes events from a smart-contract.
type Option ¶
Option modifies a configuration attribute.
func WithBlockFailedExecutionBackoff ¶
WithBlockFailedExecutionBackoff provides a sleep duration between retryiable executions. e.g: if execution block events fails due to the underlying database being unavailable, we'll wait this time before retrying.
func WithDedupExecutedTxns ¶
WithDedupExecutedTxns makes the event processor skip executing txn hashes that have already been executed before. **IMPORTANT NOTE**: This is an unsafe flag that should only be enabled in test environments. A txn hash should never appear again after it was executed since that indicates there was a reorg in the chain.
func WithHashCalcStep ¶
WithHashCalcStep determines the pace of state hash calculations. The hash will be calculated for every block equal or greater to the next multiple of the step.