Skip to content

Commit

Permalink
modify to fill IP in PeerInfo when build response peer info
Browse files Browse the repository at this point in the history
  • Loading branch information
owljoa committed Nov 4, 2018
1 parent 12c6ccb commit 85927f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ type KeyOpts struct {
PubKey Key
}

func BuildResponsePeerInfo(pubKey Key, metaData map[string]string) (*pb.Envelope, error) {
func BuildResponsePeerInfo(ip string, pubKey Key, metaData map[string]string) (*pb.Envelope, error) {
b, err := pubKey.ToByte()

if err != nil {
return nil, err
}

pi := &PeerInfo{
IP: ip,
PubKeyBytes: b,
IsPrivate: pubKey.IsPrivate(),
MetaData: metaData,
Expand Down

0 comments on commit 85927f2

Please sign in to comment.