diff --git a/chainqueue/store/base.py b/chainqueue/store/base.py index 28e69b0..246180c 100644 --- a/chainqueue/store/base.py +++ b/chainqueue/store/base.py @@ -29,7 +29,7 @@ all_local_errors = all_errors() - StatusBits.NETWORK_ERROR re_u = r'^[^_][_A-Z]+$' class Store: - def __init__(self, chain_spec, state_store, index_store, counter, cache=None): + def __init__(self, chain_spec, state_store, index_store, counter, cache=None, sync=True): self.chain_spec = chain_spec self.cache = cache self.state_store = state_store @@ -51,6 +51,9 @@ class Store: ]: setattr(self, v, getattr(self.state_store, v)) + if not sync: + return + sync_err = None try: self.state_store.sync() @@ -106,10 +109,12 @@ class Store: if item_state & state != item_state: continue - logg.info('state {} {}'.format(ref, item_state)) if item_state & not_state > 0: continue + item_state_str = self.state_store.name(item_state) + logg.info('state {} {} ({})'.format(ref, item_state_str, item_state)) + if threshold != None: v = self.state_store.modified(ref) if v > threshold: diff --git a/setup.cfg b/setup.cfg index 6e8dbaf..8dd021d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainqueue -version = 0.1.9 +version = 0.1.10 description = Generic blockchain transaction queue control author = Louis Holbrook author_email = dev@holbrook.no