lnd/chanacceptor/errors.go
carla 38fd7d206f
multi: add custom error messages to channel acceptor
This commit adds an optional error message to the channel acceptor's
reponse to allow operators to inform (or insult) unsuccessful channel
initiators as to the reason for their rejection.

This field is added in addition to the existing accept field to maintain
backwards compatibity. If we were to deprecate accept and interpret a
non-nil error as rejecting the channel, then received a response with
accept=false and a nil error, the server cannot tell whether this is a
legacy rejection or new mesage type acceptance (due to nil error),
so we keep both fields.
2020-11-10 11:38:47 +02:00

9 lines
265 B
Go

package chanacceptor
// ChanAcceptError is an error that it returned when an external channel
// acceptor rejects a channel. Note that this error type is whitelisted and will
// be delivered to the peer initiating a channel.
type ChanAcceptError struct {
error
}