cic-eth: Integrate transaction list queries

This commit is contained in:
Louis Holbrook
2021-02-17 09:33:18 +00:00
parent fcde3d0bb2
commit be3c59a780
14 changed files with 635 additions and 93 deletions

View File

@@ -0,0 +1 @@
from .filter import *

View 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,
}