Skip to content

Commit

Permalink
Merge branch 'develop' into feature/streaming
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/ethereumetl/job/mock_web3_provider.py
  • Loading branch information
medvedev1088 committed Apr 13, 2019
2 parents b46717b + 66971c8 commit 143f590
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ethereumetl/jobs/export_traces_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(

self.web3 = web3

self.batch_work_executor = BatchWorkExecutor(batch_size, max_workers)
# TODO: use batch_size when this issue is fixed https://github.com/paritytech/parity-ethereum/issues/9822
self.batch_work_executor = BatchWorkExecutor(1, max_workers)
self.item_exporter = item_exporter

self.trace_mapper = EthTraceMapper()
Expand All @@ -66,12 +67,10 @@ def _export(self):
)

def _export_batch(self, block_number_batch):
assert len(block_number_batch) > 0

filter_params = {
'fromBlock': hex(block_number_batch[0]),
'toBlock': hex(block_number_batch[-1]),
}
# TODO: Change to len(block_number_batch) > 0 when this issue is fixed
# https://github.com/paritytech/parity-ethereum/issues/9822
assert len(block_number_batch) == 1
block_number = block_number_batch[0]

if self.include_genesis_traces and 0 in block_number_batch:
genesis_traces = self.special_trace_service.get_genesis_traces()
Expand All @@ -83,7 +82,9 @@ def _export_batch(self, block_number_batch):
for trace in daofork_traces:
self.item_exporter.export_item(self.trace_mapper.trace_to_dict(trace))

json_traces = self.web3.parity.traceFilter(filter_params)
# TODO: Change to traceFilter when this issue is fixed
# https://github.com/paritytech/parity-ethereum/issues/9822
json_traces = self.web3.parity.traceBlock(block_number)

if json_traces is None:
raise ValueError('Response from the node is None. Is the node fully synced?')
Expand Down

0 comments on commit 143f590

Please sign in to comment.