chainsyncer

Blockchain syncer driver
Log | Files | Refs | LICENSE

commit 2c8ad85307819d44d54f54ec49b81ee975e9bcca
parent 5df66569814070e65b923da2330708f6f46d4c6f
Author: lash <dev@holbrook.no>
Date:   Thu,  5 May 2022 14:49:34 +0000

Upgrade chainlib, shep (state lock integrity)

Diffstat:
MCHANGELOG | 3+++
Mchainsyncer/filter.py | 1-
Dchainsyncer/paths.py | 1-
Mchainsyncer/store/base.py | 9+++------
Mrequirements.txt | 6+++---
Msetup.cfg | 2+-
6 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,6 @@ +* 0.4.5 + - Upgrade chainlib + - Upgrade shep to guarantee atomic state locks * 0.4.4 - Reinstate tx index bump in sync state on filter execution complete * 0.4.3 diff --git a/chainsyncer/filter.py b/chainsyncer/filter.py @@ -97,7 +97,6 @@ class FilterState: if self.scan != None: ks = self.scan() for v in ks: #os.listdir(self.scan_path): - logg.debug('ks {}'.format(v)) k = None try: k = self.state_store.from_elements(v) diff --git a/chainsyncer/paths.py b/chainsyncer/paths.py @@ -1 +0,0 @@ - diff --git a/chainsyncer/store/base.py b/chainsyncer/store/base.py @@ -43,7 +43,6 @@ class SyncItem: self.filter_state = filter_state self.state_key = str(offset) - logg.debug('get key {}'.format(self.state_key)) v = self.sync_state.get(self.state_key) (self.cursor, self.tx_cursor, self.target) = sync_state_deserialize(v) @@ -101,10 +100,6 @@ class SyncItem: self.sync_state.replace(self.state_key, b) - def __find_advance(self): - v = self.filter_state.state(self.state_key) - - def advance(self, ignore_lock=False): if self.skip_filter: raise FilterDone() @@ -267,7 +262,9 @@ class SyncStore: self.item_keys.append(k) logg.info('added existing {}'.format(o)) - self.get_target() + v = self.get_target() + if v != None: + target = v if len(thresholds) == 0: if self.target != None: diff --git a/requirements.txt b/requirements.txt @@ -1,5 +1,5 @@ confini~=0.6.0 semver==2.13.0 -hexathon~=0.1.5 -chainlib~=0.1.1 -shep~=0.2.3 +hexathon~=0.1.6 +chainlib~=0.1.2 +shep~=0.2.6 diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainsyncer -version = 0.4.4 +version = 0.4.5 description = Generic blockchain syncer driver author = Louis Holbrook author_email = dev@holbrook.no