From ec8ca6f0cf1b8abba2c7bceaf5d6cf2df15874cc Mon Sep 17 00:00:00 2001 From: ixv Date: Thu, 17 Jun 2021 15:53:12 -0700 Subject: [PATCH] btc: style nits, and fix watch-ack handling --- pkg/arvo/app/btc-provider.hoon | 3 +-- pkg/arvo/app/btc-wallet.hoon | 17 ++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg/arvo/app/btc-provider.hoon b/pkg/arvo/app/btc-provider.hoon index ff681b1b9b..d8cc3fd3e5 100644 --- a/pkg/arvo/app/btc-provider.hoon +++ b/pkg/arvo/app/btc-provider.hoon @@ -85,8 +85,7 @@ :: ?> ?=([%clients *] pax) ?. (is-whitelisted:hc src.bowl) - ~& >>> "btc-provider: blocked client {}" - [~[[%give %kick ~ ~]] this] + ~|("btc-provider: blocked client {}" !!) ~& > "btc-provider: accepted client {}" :- [do-ping:hc]~ this(clients.host-info (~(put in clients.host-info) src.bowl)) diff --git a/pkg/arvo/app/btc-wallet.hoon b/pkg/arvo/app/btc-wallet.hoon index 2049298c4d..ed59eef8ae 100644 --- a/pkg/arvo/app/btc-wallet.hoon +++ b/pkg/arvo/app/btc-wallet.hoon @@ -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 ({})" 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 ::