ChainSafe / discv5

A Typescript implementation of the Discv5 protocol
Apache License 2.0
28 stars 15 forks source link

`ITransport` interface changes #255

Closed acolytec3 closed 1 year ago

acolytec3 commented 1 year ago

I've updated Ultralight to use v5.0.1 in this PR and I'm curious why the getContactableAddr method was added to the ITransport interface? It looks like it just re-exports a utility method and doesn't look like it's referenced anywhere within the larger codebase. We can easily add to the other transport layers we support for Ultralight but just curious what the purpose is.

acolytec3 commented 1 year ago

One other note, I duplicated your implementation of this method in Ultralight but it looks like the interior implementation depends on getSocketAddressOnEnr which isn't exported by discv5 so I'd like to ask that you export a package path to your util directory so those utility methods can be imported. Happy to drop a PR for this as well if helpful.