Files
zeekay 47ce3bad54 codec: rip github.com/luxfi/codec from leaf-misc (Wave 1D)
Replace codec/jsonrpc.Uint32 with an in-package Uint32 JSON wrapper
(peer/jsonnum.go). The Info struct needs a string-encoded uint32 at
the JSON-RPC boundary; no broader codec dependency is needed for that.

Files touched:
- peer/jsonnum.go (new): Uint32 with MarshalJSON/UnmarshalJSON
- peer/info.go: drop codec/jsonrpc import, use local Uint32
- peer/peer.go: drop codec/jsonrpc import, use local Uint32

go.mod direct dep on luxfi/codec removed.
2026-06-05 11:56:54 -07:00

29 lines
876 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package peer
import (
"net/netip"
"time"
"github.com/luxfi/ids"
"github.com/luxfi/math/set"
)
type Info struct {
IP netip.AddrPort `json:"ip"`
PublicIP netip.AddrPort `json:"publicIP,omitempty"`
ID ids.NodeID `json:"nodeID"`
Version string `json:"version"`
LastSent time.Time `json:"lastSent"`
LastReceived time.Time `json:"lastReceived"`
ObservedUptime Uint32 `json:"observedUptime"`
TrackedChains set.Set[ids.ID] `json:"trackedChains"`
SupportedLPs set.Set[uint32] `json:"supportedLPs"`
ObjectedLPs set.Set[uint32] `json:"objectedLPs"`
}