commit 1fb526db3910ca50fa9e23b5e4b8712c3823b347
parent 3642aa5b0d2c41dcc96d603dae5413d651f81df4
Author: lash <dev@holbrook.no>
Date: Wed, 7 Jun 2023 10:51:10 +0100
Implement chainsyncer dialect
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/chaind/eth/chain.py b/chaind/eth/chain.py
@@ -12,9 +12,10 @@ from chainlib.eth.tx import (
class EthChainInterface(ChainInterface):
- def __init__(self):
+ def __init__(self, dialect_filter=None):
self._block_by_number = block_by_number
self._block_from_src = Block.from_src
self._tx_receipt = receipt
self._src_normalize = Tx.src_normalize
self._block_latest = block_latest
+ self._dialect_filter = dialect_filter
diff --git a/chaind/eth/settings.py b/chaind/eth/settings.py
@@ -16,7 +16,9 @@ def process_common(settings, config):
def process_sync(settings, config):
- settings.set('SYNCER_INTERFACE', EthChainInterface())
+ dialect_filter = settings.get('RPC_DIALECT_FILTER')
+ settings.set('SYNCER_INTERFACE', EthChainInterface(dialect_filter=dialect_filter))
+ #settings.set('SYNCER_INTERFACE', EthChainInterface())
settings = process_sync_range(settings, config)
return settings