funding: enhance error logs for failed inbound funding requests

For failed inbound funding requests, add missing error logs and make
sparse error logs more descriptive.
This commit is contained in:
Filiprogrammer 2024-04-18 21:57:47 +02:00
parent 2ccf58e2af
commit 593a564332
No known key found for this signature in database
GPG key ID: 85825F370BF5E2A1

View file

@ -1550,6 +1550,8 @@ func (f *Manager) fundeeProcessOpenChannel(peer lnpeer.Peer,
// Fail the funding flow.
flowErr := fmt.Errorf("channel acceptor blocked " +
"zero-conf channel negotiation")
log.Errorf("Cancelling funding flow for %v based on "+
"channel acceptor response: %v", cid, flowErr)
f.failFundingFlow(peer, cid, flowErr)
return
}
@ -1564,6 +1566,9 @@ func (f *Manager) fundeeProcessOpenChannel(peer lnpeer.Peer,
// Fail the funding flow.
flowErr := fmt.Errorf("scid-alias feature " +
"must be negotiated for zero-conf")
log.Errorf("Cancelling funding flow for "+
"zero-conf channel %v: %v", cid,
flowErr)
f.failFundingFlow(peer, cid, flowErr)
return
}
@ -1580,7 +1585,8 @@ func (f *Manager) fundeeProcessOpenChannel(peer lnpeer.Peer,
case public && scid:
err = fmt.Errorf("option-scid-alias chantype for public " +
"channel")
log.Error(err)
log.Errorf("Cancelling funding flow for public channel %v "+
"with scid-alias: %v", cid, err)
f.failFundingFlow(peer, cid, err)
return
@ -1589,7 +1595,8 @@ func (f *Manager) fundeeProcessOpenChannel(peer lnpeer.Peer,
// unadvertised channels for now.
case commitType.IsTaproot() && public:
err = fmt.Errorf("taproot channel type for public channel")
log.Error(err)
log.Errorf("Cancelling funding flow for public taproot "+
"channel %v: %v", cid, err)
f.failFundingFlow(peer, cid, err)
return