js-waku
js-waku copied to clipboard
create abstraction over ENR-related access between `PeerStore`
This is a feature request
Problem
With #1626, discovery classes currently write details from the ENR into the PeerStore
converting into bytes, and then decode this information when we want to use it elsewhere (eg ConnectionManager
)
Also, with work on #1463, it may be required to store more information from the ENR into the PeerStore
.
The process of manually encoding and decoding between access to the PeerStore
is somewhat redundant and can be improved.
Proposed Solutions
Create abstraction over the PeerStore.save()
method to save parts of the ENR and access from the PeerStore
.
eg: saveToPeerStore({x, y, z})
Notes
- can be done after #1626 is merged, and before or part of work on #1463