Skip to content

Commit

Permalink
feat: add setting to throttle block consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Jul 19, 2024
1 parent ac00dd2 commit 2c1e3a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
"watchdogTimeout": {
"type": "integer"
},
"processEveryNumBlocks": {
"type": "integer",
"minimum": 1,
"description": "Throttle block processing to only process blocks every N blocks. Set to 1 to process every block, 2 to process every other block, etc.",
"default": 1
},
"orderBookApi": {
"type": "string",
"format": "uri"
Expand Down
4 changes: 4 additions & 0 deletions src/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface Config {
rpc: string;
deploymentBlock: number;
watchdogTimeout?: number;
/**
* Throttle block processing to only process blocks every N blocks. Set to 1 to process every block, 2 to process every other block, etc.
*/
processEveryNumBlocks?: number;
orderBookApi?: string;
pageSize?: number;
filterPolicy: {
Expand Down

0 comments on commit 2c1e3a1

Please sign in to comment.