mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 21:57:16 +00:00
991ee7e81b
* checkpoint on super sync with reputation * ensure handling only expected peers msg * exclusive of finalized block * skip block saved already * clean up struct * remove 2 more fields * _ * everything builds, but doesnt test yet * lint * fix p2p tests * space * space * space * fmt * fmt
30 lines
839 B
Go
30 lines
839 B
Go
package p2p
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogo/protobuf/proto"
|
|
"github.com/libp2p/go-libp2p-peer"
|
|
"github.com/prysmaticlabs/prysm/shared/event"
|
|
)
|
|
|
|
// Broadcaster represents a subset of the p2p.Server. This interface is useful
|
|
// for testing or when the calling code only needs access to the broadcast
|
|
// method.
|
|
type Broadcaster interface {
|
|
Broadcast(context.Context, proto.Message)
|
|
}
|
|
|
|
// Subscriber represents a subset of the p2p.Server. This interface is useful
|
|
// for testing or when the calling code only needs access to the subscribe
|
|
// method.
|
|
type Subscriber interface {
|
|
Subscribe(msg proto.Message, channel chan Message) event.Subscription
|
|
}
|
|
|
|
// ReputationManager represents a subset of the p2p.Server which enables
|
|
// reputaiton reporting of peers.
|
|
type ReputationManager interface {
|
|
Reputation(peer peer.ID, val int)
|
|
}
|