revault/revault-gui

Notice if one of the revaultd threads panicked and *do something* in the GUI

Closed this issue · 2 comments

While trying out one of the threads panicked, but I had no way to know

So @edouardparis told me that it was handled already, so it actually may not have panic'ed.

True, my bad. This happens when the bitcoind daemon crashes:

Revault GUI_146

To reproduce:

diff --git a/src/daemon/bitcoind/interface.rs b/src/daemon/bitcoind/interface.rs
index f723b0a..5004d8b 100644
--- a/src/daemon/bitcoind/interface.rs
+++ b/src/daemon/bitcoind/interface.rs
@@ -743,6 +743,7 @@ impl BitcoinD {
 
     /// Broadcast a transaction with 'sendrawtransaction', discarding the returned txid
     pub fn broadcast_transaction(&self, tx: &Transaction) -> Result<(), BitcoindError> {
+        panic!("Uh oh");
         let tx_hex = encode::serialize_hex(tx);
         log::debug!("Broadcasting '{}'", tx_hex);
         self.make_watchonly_request("sendrawtransaction", &params!(Json::String(tx_hex)))

then try to broadcast an unvault.