Change Peers to * Peers in identity to retrieve pointer to the real peer
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-03-02 10:07:59 +01:00
parent aa63bb745f
commit 3467ea15d9
6 changed files with 26 additions and 26 deletions

View File

@ -14,7 +14,7 @@ func TestGetFromPublicKey(t *testing.T) {
var p Peer
p.Name = "test" + strconv.Itoa(i)
p.ContactPublicKey = "stringToFind" + strconv.Itoa(i)
id.Peers = append(id.Peers, p)
id.Peers = append(id.Peers, &p)
}
p5 := id.Peers.GetFromPublicKey("stringToFind5")
assert.Equal(t, p5.Name, "test5")