Revert "Implement mocks on generic tx, block"
This reverts commit dd1879bb91
.
This commit is contained in:
parent
dd1879bb91
commit
5d70550e8b
@ -115,7 +115,7 @@ class StateFilter(SyncFilter):
|
|||||||
queue_adapter = self.__get_adapter(block, force_reload=True)
|
queue_adapter = self.__get_adapter(block, force_reload=True)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
logg.info('filter registered {} for {} in {}'.format(tx.status_name, tx.hash, block))
|
logg.info('filter registered {} for {} in {}'.format(tx.status.name, tx.hash, block))
|
||||||
|
|
||||||
if self.throttler != None:
|
if self.throttler != None:
|
||||||
self.throttler.dec(tx.hash)
|
self.throttler.dec(tx.hash)
|
||||||
|
@ -7,11 +7,6 @@ from chainqueue.cache import CacheTokenTx
|
|||||||
from chainlib.status import Status as TxStatus
|
from chainlib.status import Status as TxStatus
|
||||||
from chainlib.chain import ChainSpec
|
from chainlib.chain import ChainSpec
|
||||||
from chainlib.error import RPCException
|
from chainlib.error import RPCException
|
||||||
from chainlib.tx import (
|
|
||||||
Tx,
|
|
||||||
TxResult,
|
|
||||||
)
|
|
||||||
from chainlib.block import Block
|
|
||||||
|
|
||||||
|
|
||||||
class MockCacheAdapter(CacheTokenTx):
|
class MockCacheAdapter(CacheTokenTx):
|
||||||
@ -39,17 +34,14 @@ class MockDispatcher:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MockTx(Tx):
|
class MockTx:
|
||||||
|
|
||||||
def __init__(self, tx_hash, status=TxStatus.SUCCESS):
|
def __init__(self, tx_hash, status=TxStatus.SUCCESS):
|
||||||
result = TxResult()
|
self.hash = tx_hash
|
||||||
result.status = status
|
self.status = status
|
||||||
super(MockTx, self).__init__(result=result)
|
|
||||||
self.set_hash(tx_hash)
|
|
||||||
|
|
||||||
|
|
||||||
class MockBlock(Block):
|
class MockBlock:
|
||||||
|
|
||||||
def __init__(self, number):
|
def __init__(self, number):
|
||||||
super(MockBlock, self).__init__()
|
|
||||||
self.number = number
|
self.number = number
|
||||||
|
Loading…
Reference in New Issue
Block a user