From ca6d79464adc1bebbd5e898a11e9082a6f43c78a Mon Sep 17 00:00:00 2001 From: CalDescent <> Date: Fri, 27 May 2022 20:59:43 +0200 Subject: [PATCH] Re-enable syncing when redeeming P2SH, to see if it fixes a crash when building the transaction. --- lib/src/commands.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/commands.rs b/lib/src/commands.rs index 83d300e..9be4cca 100644 --- a/lib/src/commands.rs +++ b/lib/src/commands.rs @@ -817,17 +817,17 @@ impl Command for RedeemP2shCommand { }; - // match lightclient.do_sync(true) { - // Ok(_) => { + match lightclient.do_sync(true) { + Ok(_) => { // Convert to the right format. String -> &str. let tos = send_args.iter().map(|(a, v, m)| (a.as_str(), *v, m.clone()) ).collect::>(); match lightclient.do_redeem_p2sh(from, tos, &fee, script_bytes, txid_bytes, lock_time, secret_bytes, privkey_bytes) { Ok(txid) => { object!{ "txid" => txid } }, Err(e) => { object!{ "error" => e } } }.pretty(2) - // }, - // Err(e) => e - // } + }, + Err(e) => e + } } }