mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +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_getBlockByNumber'
|
||||
:~ (tape (num-to-hex bon.req))
|
||||
:~ (tape (num-to-hex-minimal bon.req))
|
||||
b+txs.req
|
||||
==
|
||||
::
|
||||
@ -942,6 +942,15 @@
|
||||
%- render-hex-bytes
|
||||
(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
|
||||
|= a=address
|
||||
^- tape
|
||||
@ -980,6 +989,12 @@
|
||||
^- tape
|
||||
((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
|
||||
|= [wat=tape mof=@ud wer=?(%left %right)]
|
||||
^- tape
|
||||
|
Loading…
Reference in New Issue
Block a user