Compare commits
2 Commits
master
...
lash/idler
Author | SHA1 | Date | |
---|---|---|---|
|
537b5c2bbc | ||
|
fd62ad7075 |
@ -11,7 +11,7 @@ from chainsyncer.db.models.filter import BlockchainSyncFilter
|
|||||||
from chainsyncer.db.models.base import SessionBase
|
from chainsyncer.db.models.base import SessionBase
|
||||||
from .base import Backend
|
from .base import Backend
|
||||||
|
|
||||||
logg = logging.getLogger().getChild(__name__)
|
logg = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class SQLBackend(Backend):
|
class SQLBackend(Backend):
|
||||||
@ -267,7 +267,8 @@ class SQLBackend(Backend):
|
|||||||
session.flush()
|
session.flush()
|
||||||
|
|
||||||
#if block_height != block_resume:
|
#if block_height != block_resume:
|
||||||
if highest_unsynced_block < block_resume:
|
logg.info('last live id {} {} {}'.format(last_live_id, highest_unsynced_block, block_resume))
|
||||||
|
if highest_unsynced_block <= block_resume:
|
||||||
|
|
||||||
q = session.query(BlockchainSyncFilter)
|
q = session.query(BlockchainSyncFilter)
|
||||||
q = q.filter(BlockchainSyncFilter.chain_sync_id==last_live_id)
|
q = q.filter(BlockchainSyncFilter.chain_sync_id==last_live_id)
|
||||||
|
@ -65,6 +65,12 @@ class BlockPollSyncer(Syncer):
|
|||||||
:returns: See chainsyncer.backend.base.Backend.get
|
:returns: See chainsyncer.backend.base.Backend.get
|
||||||
"""
|
"""
|
||||||
(pair, fltr) = self.backend.get()
|
(pair, fltr) = self.backend.get()
|
||||||
|
(target, fltr_target) = self.backend.target()
|
||||||
|
if target == pair[0]:
|
||||||
|
logg.info('syncer was done before it started: {}'.format(self))
|
||||||
|
raise SyncDone(target)
|
||||||
|
|
||||||
|
|
||||||
start_tx = pair[1]
|
start_tx = pair[1]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = chainsyncer
|
name = chainsyncer
|
||||||
version = 0.1.0
|
version = 0.1.1
|
||||||
description = Generic blockchain syncer driver
|
description = Generic blockchain syncer driver
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user