File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed
reku/src/event/crosschecker Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,19 @@ export class AutoCrossChecker extends BaseCrossChecker {
88
88
89
89
const waitNextCrosscheck = async ( ) : Promise < boolean > => {
90
90
latestBlockNum = await timeoutWithRetry ( ( ) => this . provider . provider ?. getBlockNumber ( ) , 15 * 1000 , 3 )
91
+
92
+ // If auto-follow is enabled, update toBlock and check block range
91
93
if ( options . autoFollowLatestBlock ) {
92
94
ccrOptions . toBlock = latestBlockNum
95
+
96
+ // Check if the range exceeds the latest block number
97
+ if ( ccrOptions . fromBlock + batchBlocksCount + delayBlockFromLatest > latestBlockNum )
98
+ return false
99
+
93
100
return true
94
101
}
95
102
103
+ // If auto-follow is not enabled, check if toBlock is within the delay range
96
104
if ( ccrOptions . toBlock + delayBlockFromLatest > latestBlockNum ) {
97
105
// sleep until the toBlock
98
106
// await sleep((ccrOptions.toBlock + delayBlockFromLatest - latestBlockNum) * blockInterval)
Original file line number Diff line number Diff line change 1
1
export type { Store , StoreConfig , Stores } from 'cache-manager'
2
2
export { redisStore } from './redis'
3
+ export type { RedisStore , RedisClusterConfig } from './redis'
3
4
export * from './manager'
4
5
export { memoryStore } from './memory'
5
6
export type { MemoryStore , MemoryCache , MemoryConfig } from './memory'
Original file line number Diff line number Diff line change 1
1
import type { RedisOptions } from 'ioredis'
2
2
import { Redis } from 'ioredis'
3
3
import type { Config } from 'cache-manager'
4
+ import type { RedisStore } from 'cache-manager-ioredis-yet'
4
5
import { RedisClusterConfig , redisInsStore } from 'cache-manager-ioredis-yet'
5
6
6
7
export function redisStore (
@@ -22,3 +23,7 @@ export {
22
23
RedisClusterConfig ,
23
24
redisInsStore ,
24
25
}
26
+
27
+ export type {
28
+ RedisStore ,
29
+ }
Original file line number Diff line number Diff line change 1
- import type { Keyv } from 'keyv'
2
-
3
- export type Store = Keyv
You can’t perform that action at this time.
0 commit comments