mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-22 14:33:06 +01:00
Invert updating of DLC state and broadcasting the funding tx (#3526)
* Invert updating of DLC state and broadcasting the funding tx * Move log message
This commit is contained in:
parent
037ab7341e
commit
1d6ede492f
1 changed files with 1 additions and 2 deletions
|
@ -1157,11 +1157,10 @@ abstract class DLCWallet
|
|||
contractId: ByteVector): Future[Transaction] = {
|
||||
for {
|
||||
tx <- getDLCFundingTx(contractId)
|
||||
_ <- updateDLCState(contractId, DLCState.Broadcasted)
|
||||
_ = logger.info(
|
||||
s"Broadcasting funding transaction ${tx.txIdBE.hex} for contract ${contractId.toHex}")
|
||||
_ <- broadcastTransaction(tx)
|
||||
|
||||
_ <- updateDLCState(contractId, DLCState.Broadcasted)
|
||||
} yield tx
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue