mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 05:45:46 +03:00
eth-watcher: be quieter about parse errors
This commit is contained in:
parent
73cffdb28f
commit
b51eda4f1e
@ -124,6 +124,7 @@
|
|||||||
=. url.state url.poke
|
=. url.state url.poke
|
||||||
[[(start state [our dap]:bowl) ~] this]
|
[[(start state [our dap]:bowl) ~] this]
|
||||||
==
|
==
|
||||||
|
::
|
||||||
++ on-watch
|
++ on-watch
|
||||||
|= =path
|
|= =path
|
||||||
^- (quip card:agent:gall _this)
|
^- (quip card:agent:gall _this)
|
||||||
|
@ -398,7 +398,6 @@
|
|||||||
++ thread-fail
|
++ thread-fail
|
||||||
|= [=yarn =term =tang]
|
|= [=yarn =term =tang]
|
||||||
^- (quip card ^state)
|
^- (quip card ^state)
|
||||||
%- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
|
|
||||||
=/ =tid (yarn-to-tid yarn)
|
=/ =tid (yarn-to-tid yarn)
|
||||||
=/ fail-cards (thread-say-fail tid term tang)
|
=/ fail-cards (thread-say-fail tid term tang)
|
||||||
=^ cards state (thread-clean yarn)
|
=^ cards state (thread-clean yarn)
|
||||||
|
@ -126,28 +126,30 @@
|
|||||||
=/ m (strand:strandio ,block)
|
=/ m (strand:strandio ,block)
|
||||||
^- form:m
|
^- form:m
|
||||||
|^
|
|^
|
||||||
|
%+ (retry:strandio ,block) `10
|
||||||
|
=/ m (strand:strandio ,(unit block))
|
||||||
|
^- form:m
|
||||||
;< =json bind:m
|
;< =json bind:m
|
||||||
%+ request-rpc url
|
%+ request-rpc url
|
||||||
:- `'block by number'
|
:- `'block by number'
|
||||||
[%eth-get-block-by-number number |]
|
[%eth-get-block-by-number number |]
|
||||||
=/ =block (parse-block json)
|
(pure:m (parse-block json))
|
||||||
?. =(number number.id.block)
|
|
||||||
(strand-fail:strandio %reorg-detected >number< >block< ~)
|
|
||||||
(pure:m block)
|
|
||||||
::
|
::
|
||||||
++ parse-block
|
++ parse-block
|
||||||
|= =json
|
|= =json
|
||||||
^- block
|
^- (unit block)
|
||||||
=< [[&1 &2] |2]
|
=< ?~(. ~ `[[&1 &2] |2]:u)
|
||||||
^- [@ @ @]
|
^- (unit [@ @ @])
|
||||||
~| json
|
~| json
|
||||||
%. json
|
%. json
|
||||||
=, dejs:format
|
=, dejs-soft:format
|
||||||
%- ot
|
%- ot
|
||||||
:~ hash+parse-hex-result:rpc:ethereum
|
:~ hash+parse-hex
|
||||||
number+parse-hex-result:rpc:ethereum
|
number+parse-hex
|
||||||
'parentHash'^parse-hex-result:rpc:ethereum
|
'parentHash'^parse-hex
|
||||||
==
|
==
|
||||||
|
::
|
||||||
|
++ parse-hex |=(=json `(unit @)`(some (parse-hex-result:rpc:ethereum json)))
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ get-logs-by-hash
|
++ get-logs-by-hash
|
||||||
|
Loading…
Reference in New Issue
Block a user