fix err formatting
package net
import (
- "errors"
"fmt"
"github.com/gogo/protobuf/proto"
"github.com/spacemeshos/go-spacemesh/crypto"
@@ -354,7 +353,7 @@ func (n *Net) HandlePreSessionIncomingMessage(c Connection, message []byte) erro
// update on new connection
addr, _, err := net.SplitHostPort(c.RemoteAddr().String())
if err != nil {
- return errors.New("un-valid address format, err:%v")
+ return fmt.Errorf("un-valid address format, err: %v", err)
}
anode := node.New(c.RemotePublicKey(), net.JoinHostPort(addr, strconv.Itoa(int(data.Port))))
