lnwallet+fundingmanager: enforce max MinAcceptDepth within funding proposals

This commit is contained in:
Wilmer Paulino committed 2019-01-11 17:05:35 -08:00
1 parent 71410f6a08
commit 4f953afeee
3 files changed
+91

No files matched your search

+9
View File
@@ -123,6 +123,15 @@ func ErrMaxValueInFlightTooSmall(maxValInFlight,
}
}
// ErrNumConfsTooLarge returns an error indicating that the number of
// confirmations required for a channel is too large.
func ErrNumConfsTooLarge(numConfs, maxNumConfs uint32) error {
return ReservationError{
fmt.Errorf("minimum depth of %d is too large, max is %d",
numConfs, maxNumConfs),
}
}
// ErrChanTooSmall returns an error indicating that an incoming channel request
// was too small. We'll reject any incoming channels if they're below our
// configured value for the min channel size we'll accept.