p2p: remove NewNetAddressStringWithOptionalID (#3711)

Fixes #3521

The function NewNetAddressStringWithOptionalID is from a time when peer
IDs were optional. They're not anymore. So this should be renamed to
NewNetAddressString and should ensure the ID is provided.

* update changelog
* use NewNetAddress in transport tests
* use NewNetAddress in TestTransportMultiplexAcceptMultiple
This commit is contained in:
Anton Kaliaev
2019-06-06 00:39:28 +09:00
committed by Alexander Simmerl
parent a7e8fbf3a7
commit c1f264822a
6 changed files with 62 additions and 124 deletions

View File

@ -674,7 +674,7 @@ func (n *Node) OnStart() error {
}
// Start the transport.
addr, err := p2p.NewNetAddressStringWithOptionalID(n.config.P2P.ListenAddress)
addr, err := p2p.NewNetAddressString(p2p.IDAddressString(n.nodeKey.ID(), n.config.P2P.ListenAddress))
if err != nil {
return err
}