htlcswitch: add ForwardingError constructor
Add a constructor for the creation of forwarding errors. A special constructor is added for the case where we have an unknown wire failure, and must set a nil failure message.
This commit is contained in:
4 files changed
+89
-94
No files matched your search
+1
-4
@@ -400,10 +400,7 @@ func (o *mockDeobfuscator) DecryptError(reason lnwire.OpaqueReason) (*Forwarding
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &ForwardingError{
|
||||
FailureSourceIdx: 1,
|
||||
FailureMessage: failure,
|
||||
}, nil
|
||||
return NewForwardingError(failure, 1, ""), nil
|
||||
}
|
||||
|
||||
var _ ErrorDecrypter = (*mockDeobfuscator)(nil)
|
||||
|
||||
Reference in new issue
Block a user