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

@ -39,7 +39,7 @@ func createId() *Identity {
p.ContactEncryption = p.MyIdentity.Public
p.ContactLookupKey = p.MyEncryptionKp.Public
//p.Contact.AddUrls([]string{"http:/127.0.0.1/meow", "tcp://localhost:1234"}) //todo add servers
id.Peers = append(id.Peers, p)
id.Peers = append(id.Peers, &p)
return id
}
@ -85,7 +85,7 @@ func TestHidePeer(t *testing.T) {
func TestGetRequestJobs(t *testing.T) {
// Create a mock Identity object
id := &Identity{
Peers: []Peer{
Peers: []*Peer{
{
MyPullServers: []string{"server1", "server2"},
MyLookupKp: meowlib.NewKeyPair(),
@ -95,7 +95,7 @@ func TestGetRequestJobs(t *testing.T) {
MyLookupKp: meowlib.NewKeyPair(),
},
},
unlockedHiddenPeers: []Peer{
unlockedHiddenPeers: []*Peer{
{
MyPullServers: []string{"server5", "server6"},
MyLookupKp: meowlib.NewKeyPair(),