Files
p2p/node_sampler.go
zeekay 8120738994 Initial release: Extract p2p package from node
Extract network/p2p functionality to standalone github.com/luxfi/p2p module.

- Core p2p: handler, router, client, network, throttler, validators
- gossip: gossip protocol with bloom filter support
- lp118: warp message signature handling using github.com/luxfi/warp

All imports updated to use external luxfi packages.
2025-12-04 08:19:15 -08:00

18 lines
411 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package p2p
import (
"context"
"github.com/luxfi/ids"
)
// NodeSampler samples nodes in network
type NodeSampler interface {
// Sample returns at most [limit] nodes. This may return fewer nodes if
// fewer than [limit] are available.
Sample(ctx context.Context, limit int) []ids.NodeID
}