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.
This commit is contained in:
9 files changed
+1003
-715
No files matched your search
+699
-684
File diff suppressed because it is too large.
Load diff
@@ -791,6 +791,16 @@ message ChannelAcceptResponse {
|
||||
|
||||
// The pending channel id to which this response applies.
|
||||
bytes pending_chan_id = 2;
|
||||
|
||||
/*
|
||||
An optional error to send the initiating party to indicate why the channel
|
||||
was rejected. This field *should not* contain sensitive information, it will
|
||||
be sent to the initiating party. This field should only be set if accept is
|
||||
false, the channel will be rejected if an error is set with accept=true
|
||||
because the meaning of this response is ambiguous. Limited to 500
|
||||
characters.
|
||||
*/
|
||||
string error = 3;
|
||||
}
|
||||
|
||||
message ChannelPoint {
|
||||
|
||||
Reference in new issue
Block a user