Add chainsyncer db migration, upgrade deps

This commit is contained in:
nolash
2021-02-23 06:32:14 +01:00
parent 7752ab5c5d
commit dfd0de32e1
8 changed files with 14 additions and 14 deletions

View File

@@ -85,7 +85,6 @@ class CallbackFilter(SyncFilter):
def filter(self, conn, block, tx, db_session=None):
logg.debug('applying callback filter "{}:{}"'.format(self.queue, self.method))
chain_str = str(self.chain_spec)
transfer_data = None

View File

@@ -3,6 +3,9 @@ import logging
# third-party imports
import celery
from hexathon import (
add_0x,
)
# local imports
from cic_eth.db.models.otx import Otx
@@ -21,7 +24,7 @@ class TxFilter(SyncFilter):
def filter(self, conn, block, tx, db_session=None):
db_session = SessionBase.bind_session(db_session)
tx_hash_hex = tx.hash
otx = Otx.load(tx_hash_hex, session=db_session)
otx = Otx.load(add_0x(tx_hash_hex), session=db_session)
SessionBase.release_session(db_session)
if otx == None:
logg.debug('tx {} not found locally, skipping'.format(tx_hash_hex))

View File

@@ -75,8 +75,6 @@ SessionBase.connect(dsn, pool_size=1, debug=config.true('DATABASE_DEBUG'))
def main():
#global chain_spec, c, queue
# parse chain spec object
chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC'))

View File

@@ -18,6 +18,6 @@ eth-gas-proxy==0.0.1a4
websocket-client==0.57.0
moolb~=0.1.1b2
eth-address-index~=0.1.0a8
chainlib~=0.0.1a16
chainlib~=0.0.1a17
hexathon~=0.0.1a3
chainsyncer~=0.0.1a8
chainsyncer~=0.0.1a12