mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2026-05-27 21:47:55 +02:00
feat: add nonce bootstrapper
Useful for rebuilding the nonce cache automatically. * uses otx_sign as the first source * can fallback to chain nonce value of the 1st source is corrupted
This commit is contained in:
@@ -110,9 +110,11 @@ func initCommonRedisPool() *redis.RedisPool {
|
||||
}
|
||||
|
||||
// Load redis backed noncestore.
|
||||
func initRedisNoncestore(redisPool *redis.RedisPool) nonce.Noncestore {
|
||||
func initRedisNoncestore(redisPool *redis.RedisPool, chainProvider *celoutils.Provider, store store.Store) nonce.Noncestore {
|
||||
return nonce.NewRedisNoncestore(nonce.Opts{
|
||||
RedisPool: redisPool,
|
||||
ChainProvider: chainProvider,
|
||||
RedisPool: redisPool,
|
||||
Store: store,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func main() {
|
||||
redisPool := initCommonRedisPool()
|
||||
|
||||
store := initPgStore()
|
||||
redisNoncestore := initRedisNoncestore(redisPool)
|
||||
redisNoncestore := initRedisNoncestore(redisPool, celoProvider, store)
|
||||
lockProvider := initLockProvider(redisPool.Client)
|
||||
taskerClient := initTaskerClient(asynqRedisPool)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user