planetarium / planet-node

A simple node implementation using Libplanet
GNU Affero General Public License v3.0
7 stars 13 forks source link

`Configuration.PeerStrings` & `StaticPeerStrings` fields are unused #12

Open dahlia opened 2 years ago

dahlia commented 2 years ago

In order to let nodes communicate each other, these string values should be parsed into BoundPeers and then passed to Swarm<T>.AddPeersAsync(). Their format can be anything[^1], but it would be better if it's consistent with the existing format used by Nine Chronicles.

[^1]: Required fields: public key, host, and port number.

dahlia commented 2 years ago

It turns out BoundPeer has its own official parser. We probably don't need to implement our own parser:

https://github.com/planetarium/libplanet/blob/e19221ab6e59f07684c58b1f68f6ea8247a61f48/Libplanet.Net/BoundPeer.cs#L76-L120

dahlia commented 2 years ago

See also: https://docs.microsoft.com/en-us/dotnet/core/extensions/dependency-injection.

sensecodevalue commented 2 years ago

interested in this issue!! 🚀