htlcswitch: use distinct error for unreadable failures

This commit is contained in:
Joost Jager committed 2019-07-11 19:49:45 +02:00
1 parent 0cdae56d28
commit 418fe364de
9 files changed
+396 -165

No files matched your search

+15
View File
@@ -965,3 +965,18 @@ func (m *mockCircuitMap) NumPending() int {
func (m *mockCircuitMap) NumOpen() int {
return 0
}
type mockOnionErrorDecryptor struct {
sourceIdx int
message []byte
err error
}
func (m *mockOnionErrorDecryptor) DecryptError(encryptedData []byte) (
*sphinx.DecryptedError, error) {
return &sphinx.DecryptedError{
SenderIdx: m.sourceIdx,
Message: m.message,
}, m.err
}