mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-20 15:40:48 -04:00
Shorten function name
This struct is a wallet. The only thing it can meaningfully broadcast are transactions. The fact that they have to be signed for that is implied. You cannot broadcast unsigned transactions.
This commit is contained in:
parent
45cff81ea5
commit
3a503bf95f
3 changed files with 7 additions and 19 deletions
|
@ -130,9 +130,7 @@ pub async fn publish_bitcoin_redeem_transaction(
|
|||
bitcoin_wallet: Arc<bitcoin::Wallet>,
|
||||
) -> Result<::bitcoin::Txid> {
|
||||
info!("Attempting to publish bitcoin redeem txn");
|
||||
let txid = bitcoin_wallet
|
||||
.broadcast_signed_transaction(redeem_tx)
|
||||
.await?;
|
||||
let txid = bitcoin_wallet.broadcast(redeem_tx).await?;
|
||||
|
||||
Ok(txid)
|
||||
}
|
||||
|
@ -172,9 +170,7 @@ pub async fn publish_cancel_transaction(
|
|||
.expect("sig_{a,b} to be valid signatures for tx_cancel");
|
||||
|
||||
// TODO(Franck): Error handling is delicate, why can't we broadcast?
|
||||
bitcoin_wallet
|
||||
.broadcast_signed_transaction(tx_cancel)
|
||||
.await?;
|
||||
bitcoin_wallet.broadcast(tx_cancel).await?;
|
||||
|
||||
// TODO(Franck): Wait until transaction is mined and returned mined
|
||||
// block height
|
||||
|
@ -258,9 +254,7 @@ pub async fn publish_bitcoin_punish_transaction(
|
|||
bitcoin_wallet: Arc<bitcoin::Wallet>,
|
||||
execution_params: ExecutionParams,
|
||||
) -> Result<bitcoin::Txid> {
|
||||
let txid = bitcoin_wallet
|
||||
.broadcast_signed_transaction(punish_tx)
|
||||
.await?;
|
||||
let txid = bitcoin_wallet.broadcast(punish_tx).await?;
|
||||
|
||||
bitcoin_wallet
|
||||
.wait_for_transaction_finality(txid, execution_params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue