3c91c3a8ff
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. |
||
---|---|---|
.. | ||
error_encryptor.go | ||
forwarding_info.go | ||
iterator_test.go | ||
iterator.go | ||
log.go | ||
network.go | ||
payload_test.go | ||
payload.go | ||
type.go |