mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 21:02:01 +03:00
%eth-watcher: ensure get-block-by-number RPC call doesn't pad block number.
Resolves #6377 - stuck %eth-watcher due to get-block-by-number zero-padded number RPC failure
This commit is contained in:
parent
81ab1c8b24
commit
f5eeffef58
@ -733,7 +733,7 @@
|
|||||||
::
|
::
|
||||||
%eth-get-block-by-number
|
%eth-get-block-by-number
|
||||||
:- 'eth_getBlockByNumber'
|
:- 'eth_getBlockByNumber'
|
||||||
:~ (tape (num-to-hex bon.req))
|
:~ (tape (num-to-hex-minimal bon.req))
|
||||||
b+txs.req
|
b+txs.req
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -942,6 +942,15 @@
|
|||||||
%- render-hex-bytes
|
%- render-hex-bytes
|
||||||
(as-octs:mimes:html n)
|
(as-octs:mimes:html n)
|
||||||
::
|
::
|
||||||
|
++ num-to-hex-minimal
|
||||||
|
|= n=@
|
||||||
|
^- tape
|
||||||
|
%- prefix-hex
|
||||||
|
?: =(0 n)
|
||||||
|
"0"
|
||||||
|
%- render-hex-bytes-minimal
|
||||||
|
(as-octs:mimes:html n)
|
||||||
|
::
|
||||||
++ address-to-hex
|
++ address-to-hex
|
||||||
|= a=address
|
|= a=address
|
||||||
^- tape
|
^- tape
|
||||||
@ -980,6 +989,12 @@
|
|||||||
^- tape
|
^- tape
|
||||||
((x-co:co (mul 2 p.a)) q.a)
|
((x-co:co (mul 2 p.a)) q.a)
|
||||||
::
|
::
|
||||||
|
++ render-hex-bytes-minimal
|
||||||
|
:: atom to string of hex bytes without 0x prefix and dots, minimal representation (no padding).
|
||||||
|
|= a=octs
|
||||||
|
^- tape
|
||||||
|
((x-co:co 1) q.a)
|
||||||
|
::
|
||||||
++ pad-to-multiple
|
++ pad-to-multiple
|
||||||
|= [wat=tape mof=@ud wer=?(%left %right)]
|
|= [wat=tape mof=@ud wer=?(%left %right)]
|
||||||
^- tape
|
^- tape
|
||||||
|
Loading…
Reference in New Issue
Block a user