commit a66bb4e12d092650f89a6c130a531d7a6bd120e7
parent f72b1740d658ad8c2a47a1f32e615ece9ff7ca24
Author: lash <dev@holbrook.no>
Date: Sat, 3 Jun 2023 08:32:47 +0100
Make rpc dialect work with chain interface
Diffstat:
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,5 @@
+- 0.7.6
+ * Make rpc dialect work with chain interface
- 0.7.5
* Add readme (from man page)
* Add package descriptino (from man page)
diff --git a/eth_monitor/chain.py b/eth_monitor/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_latest = block_latest
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._dialect_filter = dialect_filter
diff --git a/eth_monitor/settings.py b/eth_monitor/settings.py
@@ -357,13 +357,14 @@ def process_cache_rpc(settings, config):
def process_sync_interface(settings, config):
- ifc = EthChainInterface()
+ ifc = EthChainInterface(dialect=settings.get('RPC_DIALECT_FILTER'))
settings.set('SYNCER_INTERFACE', ifc)
return settings
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 = process_sync_range(settings, config)
return settings
#def process_sync(settings, config):
diff --git a/requirements.txt b/requirements.txt
@@ -1,5 +1,5 @@
chainlib-eth~=0.4.17
-chainlib~=0.4.12
+chainlib~=0.4.15
chainsyncer~=0.7.0
leveldir~=0.3.0
eth-cache~=0.2.0
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-monitor
-version = 0.7.5
+version = 0.7.6
description = Monitor and cache transactions using match filters
author = Louis Holbrook
author_email = dev@holbrook.no