102f9b003f
This commit adds a ClearTextError interface which is implemented by non-opaque errors that we know the underlying wire failure message for. This interface is implemented by ForwardingErrors, because we can fully decrypt the onion blob to obtain the underlying failure reason. This interface will also be implemented by errors which originate at our node in following commits, because we know the failure reason when we fail the htlc. The lnwire interface is un-embedded in the ForwardingError struct in favour of implementing this interface. This change is made to protect against accidental passing of a ForwardingError to the wire, where the embedded FailureMessage interface will present as wire failure but will not serialize properly. |
||
---|---|---|
.. | ||
hodl | ||
hop | ||
circuit_map.go | ||
circuit_test.go | ||
circuit.go | ||
decayedlog_test.go | ||
decayedlog.go | ||
failure.go | ||
interfaces.go | ||
link_isolated_test.go | ||
link_test.go | ||
link.go | ||
linkfailure.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
payment_result_test.go | ||
payment_result.go | ||
queue_test.go | ||
queue.go | ||
sequencer.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |