mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
Add better logs for a DLCWallet.cancelDLC() (#4278)
This commit is contained in:
parent
cbfe684352
commit
d29bad3437
@ -242,6 +242,7 @@ abstract class DLCWallet
|
||||
override def cancelDLC(dlcId: Sha256Digest): Future[Unit] = {
|
||||
for {
|
||||
dlcOpt <- dlcDAO.read(dlcId)
|
||||
|
||||
dlcDb = dlcOpt match {
|
||||
case Some(db) =>
|
||||
require(
|
||||
@ -252,7 +253,8 @@ abstract class DLCWallet
|
||||
throw new IllegalArgumentException(
|
||||
s"No DLC Found with dlc id ${dlcId.hex}")
|
||||
}
|
||||
|
||||
_ = logger.info(
|
||||
s"Canceling DLC with tempContractId=${dlcDb.tempContractId.hex} dlcId=${dlcId.hex} contractId=${dlcDb.contractIdOpt}")
|
||||
inputs <- dlcInputsDAO.findByDLCId(dlcId, dlcDb.isInitiator)
|
||||
dbs <- spendingInfoDAO.findByOutPoints(inputs.map(_.outPoint))
|
||||
// allow this to fail in the case they have already been unreserved
|
||||
|
Loading…
Reference in New Issue
Block a user