From b8c25c82e480bbd2495e3c5df3359b0be180902f Mon Sep 17 00:00:00 2001 From: timlucmiptev Date: Sat, 7 Nov 2020 17:57:46 +0200 Subject: [PATCH] set state to disconnected on some errors --- BTC.scratch.md | 1 + app/btc-provider.hoon | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BTC.scratch.md b/BTC.scratch.md index e6e98afe6c..7e127c358e 100644 --- a/BTC.scratch.md +++ b/BTC.scratch.md @@ -5,6 +5,7 @@ The below requires norsyr's fix to `decompress-point` in order to work. (don't need password if all run on localhost) ``` =rpc-pass '57a6662a8ddb792a557e9fe6d1a731f954db6c35e75a91e823ab20ea7a33585b' +:btc-provider|command [%set-credentials [rpc-url='http://localhost:8332' rpc-user='__cookie__' rpc-pass] [rpc-url='http://localhost:50002']]=rpc-pass '57a6662a8ddb792a557e9fe6d1a731f954db6c35e75a91e823ab20ea7a33585b' :btc-provider|command [%set-credentials [rpc-url='http://localhost:8332' rpc-user='__cookie__' rpc-pass] [rpc-url='http://localhost:50002']] :btc-provider|action [%watch-address [%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'']] diff --git a/app/btc-provider.hoon b/app/btc-provider.hoon index b175fd69a6..731536f97d 100644 --- a/app/btc-provider.hoon +++ b/app/btc-provider.hoon @@ -174,9 +174,9 @@ %400 [`[%bad-request status] state] %401 - [`[%no-auth status] state] + [`[%no-auth status] state(connected.host-info %.n)] %502 - [`[%not-connected status] state(connected.host-info %.y)] + [`[%not-connected status] state(connected.host-info %.n)] %504 [`[%not-connected status] state(connected.host-info %.n)] ==