Re-enable syncing when redeeming P2SH, to see if it fixes a crash when building the transaction.

This commit is contained in:
CalDescent
2022-05-27 20:59:43 +02:00
parent b57610445f
commit ca6d79464a

View File

@@ -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::<Vec<_>>();
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
}
}
}