[bug] deadlock when spending from core for the faucet

This commit is contained in:
NicolasCantu 2025-01-28 21:41:45 +01:00 committed by Nicolas Cantu
parent f8da919404
commit ba318b9bd3

View File

@ -235,13 +235,15 @@ fn faucet_send(sp_address: SilentPaymentAddress, commitment: &str) -> Result<(Tr
faucet_tx.input[0].witness.push(final_sig.to_vec());
let daemon = DAEMON
.get()
.ok_or(Error::msg("DAEMON not initialized"))?
.lock_anyhow()?;
daemon.broadcast(&core_tx)?;
let txid = daemon.broadcast(&faucet_tx)?;
log::debug!("Sent tx {}", txid);
{
let daemon = DAEMON
.get()
.ok_or(Error::msg("DAEMON not initialized"))?
.lock_anyhow()?;
daemon.broadcast(&core_tx)?;
let txid = daemon.broadcast(&faucet_tx)?;
log::debug!("Sent tx {}", txid);
}
let partial_tweak = compute_partial_tweak_to_transaction(&faucet_tx)?;