-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Some networking cleanups #504
Conversation
| } | ||
| match swarm_controller.listen_on(shared.config.listen_address.clone()) { | ||
| Ok(new_addr) => { | ||
| debug!(target: "sub-libp2p", "Libp2p listening on {}", new_addr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we print new_addr instead of listen_address.
The only practical difference is that if the user specifies port 0, then new_addr will contain the actual port we're listening on, and not 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would happen if there is something already listening on the specified multiaddr?
| } | ||
|
|
||
| /// Create new default configuration for localhost-only connection with random port (usefull for testing) | ||
| /// Create new default configuration for localhost-only connection with random port (useful for testing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, help me understand, I thought that AddrComponent::TCP(30333) should assign the specific port. Why this saying "with random port" then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I screwed up.
|
Filter functionality is quite useful in parity-ethereum. Is there anything to replace it in libp2p? |
I removed it in this PR as it was neither implemented nor used, but it shouldn't be hard to actually implement. |
* master: README: fixed typo in docker run command (#518) Merge *_at methods. (#515) New flags to listen to all interfaces (#495) If contract reaches max depth, return Err (#503) Some networking cleanups (#504) Derivable Encode & Decode (#509) substrate: return Option in all storage related RPC methods (#510) Build with locked Cargo.lock on CI (#514) Place call data into a newly allocated pages (#502)
* Some networking cleanups * Fix tests * Fix wrong port in new_local
* Update cargo files * First round of build fixes * update lock file
This reverts commit 89ac39f.
…age-access Control non-root storage access
Signed-off-by: Gregory Hill <[email protected]>
NetworkConfiguration. I removed the fields that were neither set by the CLI nor implemented by libp2p. Re-adding some fields (such asmax_handshakes) can easily be done at the time we implement them.listen_addressandpublic_addressare now aMultiaddrinstead of aSocketAddr. This doesn't change much in practice for now.IpFilterandNetworkIoMessagetypes and the dependency on theipnetworkcrate.