Replace cic-base with chainlib cli utils

This commit is contained in:
Louis Holbrook
2021-08-17 06:46:51 +00:00
parent 3be1c1b33d
commit bb3d38a1f9
122 changed files with 984 additions and 832 deletions

View File

@@ -3,7 +3,7 @@ import logging
import datetime
# external imports
from chainsyncer.driver import HeadSyncer
from chainsyncer.driver.head import HeadSyncer
from chainsyncer.backend.memory import MemBackend
from chainsyncer.error import NoBlockForYou
from chainlib.eth.block import (
@@ -39,9 +39,9 @@ class DbSessionMemBackend(MemBackend):
class RetrySyncer(HeadSyncer):
def __init__(self, conn, chain_spec, stalled_grace_seconds, batch_size=50, failed_grace_seconds=None):
def __init__(self, conn, chain_spec, chain_interface, stalled_grace_seconds, batch_size=50, failed_grace_seconds=None):
backend = DbSessionMemBackend(chain_spec, None)
super(RetrySyncer, self).__init__(backend)
super(RetrySyncer, self).__init__(backend, chain_interface)
self.chain_spec = chain_spec
if failed_grace_seconds == None:
failed_grace_seconds = stalled_grace_seconds