commit 10e16dcb00333869d1e22999a6c782f8c04dfa7e
parent d36b3ed6736307aed286c370be30936250bbdc9e
Author: lash <dev@holbrook.no>
Date: Sun, 13 Aug 2023 17:58:18 +0100
Implement and expose dialect filters for chain interface
Diffstat:
5 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,6 @@
+- 0.8.5
+ * Instantiate constructor for chain interface superclass
+ * Remove unused settings transform method for sync interface
- 0.8.4
* Update man pages with rpc batch limit setting
- 0.8.3
diff --git a/eth_monitor/chain.py b/eth_monitor/chain.py
@@ -8,15 +8,19 @@ from chainlib.eth.block import (
from chainlib.eth.tx import (
receipt,
Tx,
+ transaction,
)
class EthChainInterface(ChainInterface):
def __init__(self, dialect_filter=None, batch_limit=1):
+ super(EthChainInterface, self).__init__(dialect_filter=dialect_filter, batch_limit=batch_limit)
self.batch_limit = batch_limit
self._block_latest = block_latest
self._block_by_number = block_by_number
self._block_from_src = Block.from_src
+ self._tx_from_src = Tx.from_src
self._tx_receipt = receipt
self._src_normalize = Tx.src_normalize
self._dialect_filter = dialect_filter
+ self._tx_by_hash = transaction
diff --git a/eth_monitor/settings.py b/eth_monitor/settings.py
@@ -356,22 +356,11 @@ def process_cache_rpc(settings, config):
return settings
-def process_sync_interface(settings, config):
- ifc = EthChainInterface(dialect=settings.get('RPC_DIALECT_FILTER'))
- settings.set('SYNCER_INTERFACE', ifc)
- return settings
-
-
def process_sync(settings, config):
dialect_filter = settings.get('RPC_DIALECT_FILTER')
settings.set('SYNCER_INTERFACE', EthChainInterface(dialect_filter=dialect_filter, batch_limit=settings.get('RPC_BATCH_LIMIT')))
settings = process_sync_range(settings, config)
return settings
-#def process_sync(settings, config):
-# settings = process_sync_interface(settings, config)
-# settings = process_sync_backend(settings, config)
-# settings = process_sync_range(settings, config)
-# return settings
def process_cache(settings, config):
diff --git a/requirements.txt b/requirements.txt
@@ -1,6 +1,6 @@
-chainlib-eth~=0.5.0
-chainlib~=0.5.1
-chainsyncer~=0.8.2
+chainlib-eth~=0.5.1
+chainlib~=0.5.2
+chainsyncer~=0.8.3
leveldir~=0.3.0
eth-cache~=0.3.0
confini~=0.6.3
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-monitor
-version = 0.8.4
+version = 0.8.5
description = Monitor and cache transactions using match filters
author = Louis Holbrook
author_email = dev@holbrook.no