mirror of
https://github.com/luxfi/p2p.git
synced 2026-10-30 15:22:55 +00:00
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.
18 lines
411 B
Go
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
|
|
}
|