btc: style nits, and fix watch-ack handling

This commit is contained in:
ixv 2021-06-17 15:53:12 -07:00
parent 0fe385df1f
commit ec8ca6f0cf
2 changed files with 11 additions and 9 deletions

View File

@ -85,8 +85,7 @@
::
?> ?=([%clients *] pax)
?. (is-whitelisted:hc src.bowl)
~& >>> "btc-provider: blocked client {<src.bowl>}"
[~[[%give %kick ~ ~]] this]
~|("btc-provider: blocked client {<src.bowl>}" !!)
~& > "btc-provider: accepted client {<src.bowl>}"
:- [do-ping:hc]~
this(clients.host-info (~(put in clients.host-info) src.bowl))

View File

@ -167,6 +167,11 @@
|= [=wire =sign:agent:gall]
^- (quip card _this)
?+ -.sign (on-agent:def wire sign)
%watch-ack
?~ p.sign `this
%- (slog leaf+"connection rejected by provider ({<src.bowl>})" u.p.sign)
`this
::
%kick
?~ prov `this
?: ?& ?=(%set-provider -.wire)
@ -724,13 +729,9 @@
(retry-scans network)
==
=? cards ?&(?=(^ blockhash) ?=(^ blockfilter) (gth gap 0))
;: weld cards
(retry-filtered-addrs network u.blockhash u.blockfilter)
==
(weld cards (retry-filtered-addrs network u.blockhash u.blockfilter))
=? cards (gth gap 50)
;: weld cards
(retry-addrs network)
==
(weld cards (retry-addrs network))
:- cards
%_ state
prov `p(connected %.y)
@ -755,7 +756,9 @@
%- zing
%+ murn ~(tap by scans)
|= [[=xpub:bc =chyg] =batch]
?. =(network network:(~(got by walts) xpub)) ~
=/ w (~(get by walts) xpub)
?~ w ~
?. =(network network.u.w) ~
`-:(req-scan batch xpub chyg)
:: +retry-addrs: get info on addresses with unconfirmed UTXOs
::