cic-eth: Integrate transaction list queries
This commit is contained in:
1
apps/cic-eth/tests/mock/__init__.py
Normal file
1
apps/cic-eth/tests/mock/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .filter import *
|
||||
22
apps/cic-eth/tests/mock/filter.py
Normal file
22
apps/cic-eth/tests/mock/filter.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# third-party imports
|
||||
import celery
|
||||
import moolb
|
||||
|
||||
celery_app = celery.current_app
|
||||
|
||||
block_filter = moolb.Bloom(1024, 3)
|
||||
tx_filter = moolb.Bloom(1024, 3)
|
||||
lo = 0
|
||||
hi = 100
|
||||
|
||||
|
||||
@celery_app.task()
|
||||
def filter(address, offset, limit):
|
||||
return {
|
||||
'alg': 'sha256',
|
||||
'high': hi,
|
||||
'low': lo,
|
||||
'block_filter': block_filter.to_bytes().hex(),
|
||||
'blocktx_filter': tx_filter.to_bytes().hex(),
|
||||
'filter_rounds': 3,
|
||||
}
|
||||
Reference in New Issue
Block a user