Move logic to extend til blocks to til

Previously, the synchronizer test was extending the output from til to
precalculate many fields to compare it with the synchronizer and BD output.
Since this is useful outside of the syncrhonizer testing: move this
functionality to til via a function that extends the output
(til.Context.FillBlocksExtra).

Also, add new functionality: calculate fee idxs dynamically by setting a user
name, and calculate collected fees.
This commit is contained in:
Eduard S
2020-11-04 18:19:17 +01:00
parent 6e4b9b4b70
commit 5ebf46e045
6 changed files with 282 additions and 154 deletions

View File

@@ -21,6 +21,7 @@ CREATE TABLE batch (
eth_block_num BIGINT NOT NULL REFERENCES block (eth_block_num) ON DELETE CASCADE,
forger_addr BYTEA NOT NULL, -- fake foreign key for coordinator
fees_collected BYTEA NOT NULL,
fee_idxs_coordinator BYTEA NOT NULL,
state_root BYTEA NOT NULL,
num_accounts BIGINT NOT NULL,
last_idx BIGINT NOT NULL,