5 Commits

Author SHA1 Message Date
lash
5d70550e8b Revert "Implement mocks on generic tx, block"
This reverts commit dd1879bb91.
2022-05-09 19:27:20 +00:00
lash
dd1879bb91 Implement mocks on generic tx, block 2022-05-09 19:25:31 +00:00
lash
e264ed5c37 Upgrade deps, to avoid shep sync on persist set 2022-05-05 17:08:09 +00:00
lash
d472bd4f7c Upgrade deps, handle filestore list exception in shep 2022-05-05 15:41:30 +00:00
lash
465d692956 Upgrade deps 2022-05-05 15:02:21 +00:00
6 changed files with 18 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
- 0.2.11
* Upgrade shep to handle exception in filestore list
- 0.2.10
* Upgrade shep to guarantee state lock atomicity
- 0.2.9
* Minimize instantiations of adapters in filter execution
- 0.2.8

View File

@@ -76,7 +76,6 @@ class StateFilter(SyncFilter):
break
except NotLocalTxError:
logg.debug('skipping not local transaction {}'.format(tx.hash))
self.__stop_adapter()
return False
except BackendError as e:
logg.error('adapter get failed: {}, one more try'.format(e))

View File

@@ -39,3 +39,9 @@ class MockTx:
def __init__(self, tx_hash, status=TxStatus.SUCCESS):
self.hash = tx_hash
self.status = status
class MockBlock:
def __init__(self, number):
self.number = number

View File

@@ -1,6 +1,6 @@
chainlib~=0.1.2
chainqueue~=0.1.12
chainsyncer~=0.4.4
chainqueue~=0.1.15
chainsyncer~=0.4.7
confini~=0.6.0
funga~=0.5.2
pyxdg~=0.26

View File

@@ -1,6 +1,6 @@
[metadata]
name = chaind
version = 0.2.9
version = 0.2.11
description = Base package for chain queue service
author = Louis Holbrook
author_email = dev@holbrook.no

View File

@@ -14,6 +14,7 @@ from chaind.filter import StateFilter
# test imports
from chaind.unittest.common import (
MockTx,
MockBlock,
MockCacheAdapter,
MockDispatcher,
)
@@ -76,7 +77,8 @@ class TestChaindFs(TestChaindFsBase):
fltr = StateFilter(self.chain_spec, self.path, MockCacheAdapter)
tx = MockTx(hsh)
fltr.filter(None, None, tx)
block = MockBlock(42)
fltr.filter(None, block, tx)
def test_fs_filter_fail(self):
@@ -87,7 +89,8 @@ class TestChaindFs(TestChaindFsBase):
fltr = StateFilter(self.chain_spec, self.path, MockCacheAdapter)
tx = MockTx(hsh, TxStatus.ERROR)
fltr.filter(None, None, tx)
block = MockBlock(42)
fltr.filter(None, block, tx)
def test_upcoming(self):