Skip to content

Commit

Permalink
add max block dist env config
Browse files Browse the repository at this point in the history
  • Loading branch information
mfornos committed Oct 27, 2023
1 parent ba8b774 commit a70add8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/monitoring/head-catcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import { ChainHead, BinBlock, GetOutboundHrmpMessages, GetOutboundUmpMessages, H
import { Janitor } from '../../services/persistence/janitor.js';
import { ServiceConfiguration } from '../../services/config.js';

const MAX_BLOCK_DIST = 150n; // maximum distance in #blocks
const MAX_BLOCK_DIST : bigint = process.env.XCMON_MAX_BLOCK_DIST ?
BigInt(process.env.XCMON_MAX_BLOCK_DIST)
: 150n; // maximum distance in #blocks
const max = (...args : bigint[]) => args.reduce((m, e) => e > m ? e : m);

/**
Expand Down

0 comments on commit a70add8

Please sign in to comment.