don't transmit nil predecessors
This commit is contained in:
parent
93771480ff
commit
68ce8c5f34
@ -43,5 +43,5 @@ func readResponse[T any](r *http.Response) (x T, err error) {
|
|||||||
|
|
||||||
type neighbors struct {
|
type neighbors struct {
|
||||||
Succ []netip.AddrPort `json:"succ"`
|
Succ []netip.AddrPort `json:"succ"`
|
||||||
Pred netip.AddrPort `json:"pred"`
|
Pred netip.AddrPort `json:"pred,omitzero"`
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ type Node struct {
|
|||||||
// self is the node topology this server represents.
|
// self is the node topology this server represents.
|
||||||
self *chord.Node
|
self *chord.Node
|
||||||
// client is the Chord client for forwarding queries to other nodes.
|
// client is the Chord client for forwarding queries to other nodes.
|
||||||
|
// TODO(branden): really we should have a client per peer so that we can
|
||||||
|
// interchange protocols
|
||||||
client chord.Client
|
client chord.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user