Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42aa809500
|
||
|
|
e31367853c
|
||
|
|
9522729fa0
|
@@ -67,10 +67,18 @@ settings.process(config)
|
||||
logg.debug('settings:\n{}'.format(settings))
|
||||
|
||||
|
||||
def process_outgoing(chain_spec, adapter, rpc, limit=100):
|
||||
upcoming = adapter.upcoming()
|
||||
logg.info('process {} {} {}'.format(chain_spec, adapter, rpc))
|
||||
logg.info('upcoming {}'.format(upcoming))
|
||||
def process_outgoing(chain_spec, adapter, rpc, limit=50):
|
||||
adapter = None
|
||||
process_err = None
|
||||
adapter = ChaindFsAdapter(
|
||||
settings.get('CHAIN_SPEC'),
|
||||
settings.dir_for('queue'),
|
||||
EthCacheTx,
|
||||
dispatcher,
|
||||
)
|
||||
|
||||
upcoming = adapter.upcoming(limit=limit)
|
||||
logg.info('processor has {} candidates for {}, processing with limit {} adapter {} rpc {}'.format(len(upcoming), chain_spec, limit, adapter, rpc))
|
||||
i = 0
|
||||
for tx_hash in upcoming:
|
||||
if adapter.dispatch(tx_hash):
|
||||
|
||||
@@ -8,7 +8,6 @@ import chainsyncer.cli
|
||||
import chaind.cli
|
||||
from chaind.setup import Environment
|
||||
from chaind.filter import StateFilter
|
||||
from chaind.adapters.fs import ChaindFsAdapter
|
||||
from chainlib.eth.block import block_latest
|
||||
from hexathon import strip_0x
|
||||
from chainsyncer.store.fs import SyncFsStore
|
||||
@@ -59,13 +58,7 @@ logg.debug('settings:\n{}'.format(settings))
|
||||
|
||||
|
||||
def main():
|
||||
queue_adapter = ChaindFsAdapter(
|
||||
settings.get('CHAIN_SPEC'),
|
||||
settings.dir_for('queue'),
|
||||
EthCacheTx,
|
||||
None,
|
||||
)
|
||||
fltr = StateFilter(queue_adapter)
|
||||
fltr = StateFilter(settings.get('CHAIN_SPEC'), settings.dir_for('queue'), EthCacheTx)
|
||||
sync_store = SyncFsStore(settings.get('SESSION_DATA_DIR'), session_id=settings.get('SESSION_ID'))
|
||||
sync_store.register(fltr)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
chaind~=0.1.3
|
||||
chaind~=0.2.2
|
||||
hexathon~=0.1.5
|
||||
chainlib-eth~=0.1.1
|
||||
pyxdg~=0.27
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = chaind-eth
|
||||
version = 0.1.5
|
||||
version = 0.2.1
|
||||
description = Queue server for ethereum
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
||||
2
setup.py
2
setup.py
@@ -27,7 +27,7 @@ while True:
|
||||
l = f.readline()
|
||||
if l == '':
|
||||
break
|
||||
test_requirements.append(l.rstrip())
|
||||
erc20_requirements.append(l.rstrip())
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from chainlib.chain import ChainSpec
|
||||
from chainqueue.cache import CacheTokenTx
|
||||
from chainlib.error import RPCException
|
||||
from chainlib.status import Status as TxStatus
|
||||
from chaind.unittest.common import TestChaindFsBase
|
||||
from chaind.unittest.fs import TestChaindFsBase
|
||||
from chaind.driver import QueueDriver
|
||||
from chaind.filter import StateFilter
|
||||
from chainlib.eth.gas import Gas
|
||||
|
||||
Reference in New Issue
Block a user