diff --git a/chord/httpnode/httpnode.go b/chord/httpnode/httpnode.go index 19db9d9..bdc5672 100644 --- a/chord/httpnode/httpnode.go +++ b/chord/httpnode/httpnode.go @@ -43,5 +43,5 @@ func readResponse[T any](r *http.Response) (x T, err error) { type neighbors struct { Succ []netip.AddrPort `json:"succ"` - Pred netip.AddrPort `json:"pred"` + Pred netip.AddrPort `json:"pred,omitzero"` } diff --git a/chord/httpnode/server.go b/chord/httpnode/server.go index 7dcf2ef..4c55101 100644 --- a/chord/httpnode/server.go +++ b/chord/httpnode/server.go @@ -13,6 +13,8 @@ type Node struct { // self is the node topology this server represents. self *chord.Node // 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 }