From 61e70c928b4025cdcab4a2871f91455c898e7827 Mon Sep 17 00:00:00 2001 From: drbeefsupreme Date: Thu, 24 Mar 2022 19:12:54 -0400 Subject: [PATCH] squash! naive: l2 csv refactoring for readability --- pkg/arvo/ted/naive-csv.hoon | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/arvo/ted/naive-csv.hoon b/pkg/arvo/ted/naive-csv.hoon index 6116758ec5..fdf928f107 100644 --- a/pkg/arvo/ted/naive-csv.hoon +++ b/pkg/arvo/ted/naive-csv.hoon @@ -98,16 +98,16 @@ =/ pax=path /naive-exports/csv :: data will be saved here =/ m (strand ,vase) ^- form:m - ;< logs=events bind:m (scry events /gx/azimuth/logs/noun) - =/ logs (scag 50 logs) :: to make debugging faster + ;< =events bind:m (scry events /gx/azimuth/logs/noun) + =/ events (scag 50 events) :: to make debugging faster =/ [naive-contract=address chain-id=@] [naive chain-id]:(get-network:dice net) =/ snap=snap-state:dice snap %- %- slog :_ ~ - leaf+"processing {} ethereum logs with {<(lent logs)>} events" + leaf+"processing {} ethereum logs with {<(lent events)>} events" :: =/ =rolls-map - (compute-effects nas.snap logs net naive-contract chain-id) + (compute-effects nas.snap events net naive-contract chain-id) :: I think this should work, but child threads seem to be broken :: ;< =thread-result bind:m :: %+ await-thread @@ -341,7 +341,7 @@ :: determine whether the transactions were valid. ++ compute-effects |= $: nas=^state:naive - logs=events + =events =net naive-contract=address chain-id=@ud @@ -352,11 +352,11 @@ leaf+"processing state transitions beginning from stored snapshot" :: |- - ?~ logs out - =/ log=event-log:rpc:ethereum i.logs + ?~ events out + =/ log=event-log:rpc:ethereum i.events ?~ mined.log ~& >> 'empty log' - $(logs t.logs) + $(events t.events) =/ block=blocknum block-number.u.mined.log =/ =^input:naive :- block @@ -370,7 +370,7 @@ =^ =effects:naive nas (%*(. naive lac |) verifier:naive-tx chain-id nas input) %= $ - logs t.logs + events t.events out ?. =(%bat +<.input) out :: skip L1 logs :: there's probably a better way to do this