Skip to content

Commit e8f632d

Browse files
committed
feat(utils): add type Milliseconds
1 parent 43052ab commit e8f632d

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

packages/orap/mock/demo/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export const config = {
66
}
77

88
const logLevel = 'debug'
9-
export const logger = new Logger(logLevel, '[demo]')
9+
export const logger = new Logger(logLevel, '[orap-mock-demo]')

packages/reku/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Options:
2828
- `store`?: the Store used to cache the <txhash, logindex> that already processed.
2929
- `storeKeyPrefix`?: set the prefix to all keys when set key-value to store (cache), e.g. key = prefix+'txHashList', prefix can be "project:app:" to form a "project:app:txHashList" redis key.
3030
- `batchBlocksCount`?: how many blocks to get per `getLogs` check, in readtime mode it waits until the new block num >= `batchBlocksCount`.
31-
- `pollingInterval`?: how long does it take between 2 block height check polling checks; mostly for limiting getLogs calling rate in catchup mode
32-
- `blockInterval`?: the block interval (in ms) of the given chain, default: 12000 for eth
3331
- `delayBlockFromLatest`?: mostly for realtime mode; each time cc wait until `latest height > toBlock + delayBlockFromLatest`
32+
- `blockInterval`?: the block interval (in ms) of the given chain, default: 12000 for eth
33+
- `pollingInterval`?: how long does it take between 2 block height check polling checks; mostly for limiting getLogs calling rate in catchup mode
3434
- `fromBlock`?: once specified, it means start catching up from historical blocks
3535
- `toBlock`?: once specified, it means the crosscheck isn't infinite and will end at this height; need `fromBlock` present if this set
3636

packages/reku/event/crosschecker/interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Awaitable, Store } from '@ora-io/utils'
1+
import type { Awaitable, Milliseconds, Store } from '@ora-io/utils'
22
import type { ethers } from 'ethers'
33

44
export type FnOnMissingLog = (log: ethers.Log) => Awaitable<void>
@@ -34,7 +34,7 @@ export interface AutoCrossCheckParam extends BaseCrossCheckParam {
3434
store?: Store
3535
storeKeyPrefix?: string // set the prefix to all keys when set key-value to store (cache), e.g. key = prefix+txHashList
3636
batchBlocksCount?: number // how many blocks at most to get per check
37-
pollingInterval?: number // mostly for limiting getLogs calling rate in catchup mode; how long does it take at least between 2 checks
38-
blockInterval?: number // the block interval of the given chain, default: eth
3937
delayBlockFromLatest?: number // mostly for realtime mode; each time cc wait until latest height > toBlock + delayBlockFromLatest
38+
blockInterval?: Milliseconds // the block interval of the given chain, default: eth
39+
pollingInterval?: Milliseconds // mostly for limiting getLogs calling rate in catchup mode; how long does it take at least between 2 checks
4040
}

packages/utils/common/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './logger'
22
export * from './retry'
3+
export * from './type'

packages/utils/common/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type Milliseconds = number

0 commit comments

Comments
 (0)