Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DiscoveryInterval is how often we re-publish our mDNS records. DiscoveryInterval = time.Second // DiscoveryServiceTag is used in our mDNS advertisements to discover other chat peers. DiscoveryServiceTag = "bloxstaking.ssv" // MsgChanSize is the buffer size of the message channel MsgChanSize = 128 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { DiscoveryType string BootstrapNodeAddr []string Discv5BootStrapAddr []string UDPPort int TCPPort int HostAddress string HostDNS string HostID peer.ID Topics map[string]*pubsub.Topic Subs []*pubsub.Subscription // params MaxBatchResponse uint64 // maximum number of returned objects in a batch RequestTimeout time.Duration }
Config - describe the config options for p2p network
type SyncStream ¶
type SyncStream struct {
// contains filtered or unexported fields
}
SyncStream is a wrapper struct for the core.Stream interface to match the network.SyncStream interface
func (*SyncStream) CloseWrite ¶
func (s *SyncStream) CloseWrite() error
CloseWrite closes write stream
func (*SyncStream) Read ¶
func (s *SyncStream) Read(p []byte) (n int, err error)
Read reads data to p
func (*SyncStream) RemotePeer ¶
func (s *SyncStream) RemotePeer() string
RemotePeer returns connected peer
type TestValidatorStorage ¶
type TestValidatorStorage struct { }
TestValidatorStorage implementation
func (*TestValidatorStorage) GetAllValidatorsShare ¶
func (v *TestValidatorStorage) GetAllValidatorsShare() ([]*storage.Share, error)
GetAllValidatorsShare implementation
func (*TestValidatorStorage) LoadFromConfig ¶
func (v *TestValidatorStorage) LoadFromConfig(nodeID uint64, pubKey *bls.PublicKey, shareKey *bls.SecretKey, ibftCommittee map[uint64]*proto.Node) error
LoadFromConfig implementation
func (*TestValidatorStorage) SaveValidatorShare ¶
func (v *TestValidatorStorage) SaveValidatorShare(validator *storage.Share) error
SaveValidatorShare implementation
Click to show internal directories.
Click to hide internal directories.