lnd.xprv/htlcswitch/hop
Conner Fromknecht 3c91c3a8ff
htlcswitch/hop/payload: required failures with ErrInvalidPayload
This commit adds a hop.PayloadViolation enum which encompasses the cases
where the sender omits, includes, or requires a type that causes an
ErrInvalidPayload faiulre.

The existing Omitted bool is converted to this PayloadViolation, and
NewPayloadFromReader is updated to return such a failure with a
RequiredViolation when an unknown required type is detected.

The unit tests are updated to cover the three possible cases of
RequiredViolations, as well as included valid intermediate and final hop
tests.
2019-10-30 21:19:08 -07:00
..
error_encryptor.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
forwarding_info.go htlcswitch+hop: move ForwardingInfo to hop.ForwaringInfo 2019-09-05 01:35:23 -07:00
iterator_test.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
iterator.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
log.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
network.go htlcswitch/hop: move NetworkHop to hop.Network 2019-09-05 01:35:20 -07:00
payload_test.go htlcswitch/hop/payload: required failures with ErrInvalidPayload 2019-10-30 21:19:08 -07:00
payload.go htlcswitch/hop/payload: required failures with ErrInvalidPayload 2019-10-30 21:19:08 -07:00
type.go htlcswitch/hop: move hop.Exit and hop.Source to hop pkg 2019-09-05 01:35:23 -07:00