htlcswitch: use distinct error for unreadable failures

This commit is contained in:
Joost Jager
2019-06-19 11:12:10 +02:00
parent 0cdae56d28
commit 418fe364de
9 changed files with 396 additions and 165 deletions

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
}