initialize node data maps
This commit is contained in:
parent
4a69e64654
commit
bfc9fe5d56
@ -94,6 +94,7 @@ func Join(ctx context.Context, cl Client, addr netip.AddrPort, np Peer) (*Node,
|
||||
self: self,
|
||||
succ: s,
|
||||
fingers: make([]Peer, 0, 8*len(ID{})),
|
||||
data: make(map[ID]string),
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
|
@ -205,6 +205,7 @@ func Create(addr netip.AddrPort) (*Node, error) {
|
||||
self: self,
|
||||
succ: []Peer{self}[:1:1], // extra cautious about capacity
|
||||
fingers: make([]Peer, 0, len(ID{})*8),
|
||||
data: make(map[ID]string),
|
||||
}
|
||||
return n, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user