Skip to content

Rework ENR code to solve several shortcomings  #706

@kdeme

Description

@kdeme

There are several issues in the current ENR code, to name some:

  • Currently it is possible to have FieldPairs with duplicate keys or even full duplicate FieldPairs in the ENR due to the custom extraFields in the API
  • Currently we cannot remove FIeldPairs in some update ENR function (see also ENR update call does not remove fields that are no longer applicable #639)
  • Currently when using the API with Opt IpAddres or Port, providing an Opt.none will not actually remove the field
  • Some API that is more restrictive than the other: Record.init versus initRecord. The latter is not even used anywhere except for testing.
  • the extraFields parameters and initRecord API allows for reserved keys with invalid types to get into the ENR.

Additionally, there is currently no easy API to set the ip6, tcp6 and udp6 reserved fields. It is only possible through the custom extraFields, which doesn't limit these reserved keys to the correct value type.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions