aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/order_watcher/event_watcher.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-watcher/src/order_watcher/event_watcher.ts')
-rw-r--r--packages/order-watcher/src/order_watcher/event_watcher.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/order-watcher/src/order_watcher/event_watcher.ts b/packages/order-watcher/src/order_watcher/event_watcher.ts
index 08ecf81cb..38ba8101e 100644
--- a/packages/order-watcher/src/order_watcher/event_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/event_watcher.ts
@@ -27,13 +27,16 @@ export class EventWatcher {
private _pollingIntervalMs: number;
private _stateLayer: BlockParamLiteral;
private _isVerbose: boolean;
+ private _blockRetention: number;
constructor(
web3Wrapper: Web3Wrapper,
pollingIntervalIfExistsMs: undefined | number,
stateLayer: BlockParamLiteral = BlockParamLiteral.Latest,
+ blockRetention: number,
isVerbose: boolean,
) {
this._isVerbose = isVerbose;
+ this._blockRetention = blockRetention;
this._web3Wrapper = web3Wrapper;
this._stateLayer = stateLayer;
this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs)
@@ -69,6 +72,9 @@ export class EventWatcher {
this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper, this._stateLayer),
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper, eventFilter),
this._onBlockAndLogStreamerError.bind(this),
+ {
+ blockRetention: this._blockRetention,
+ },
);
const catchAllLogFilter = {};
this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);