lnwallet+fundingmgr: ignore shim channels in pending count

Externally funded channels are expected by the user and explicitly
registered through the use of a funding shim and should therefore not
count towards the max pending channel count which is primarily there to
mitigate DoS attacks.
This commit is contained in:
Oliver Gugger committed 2020-08-28 12:28:43 +02:00
1 parent 8b894fe321
commit f2e0ed19ff
2 files changed
+27 -2

No files matched your search

+7
View File
@@ -492,6 +492,13 @@ func (r *ChannelReservation) IsPsbt() bool {
return ok
}
// IsCannedShim returns true if there is a canned shim funding intent mapped to
// this reservation.
func (r *ChannelReservation) IsCannedShim() bool {
_, ok := r.fundingIntent.(*chanfunding.ShimIntent)
return ok
}
// ProcessPsbt continues a previously paused funding flow that involves PSBT to
// construct the funding transaction. This method can be called once the PSBT is
// finalized and the signed transaction is available.