mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-07 10:12:19 +00:00
c17db32069
Former-commit-id: 2790cf05b6dbae32cc8ced818e0af70bb20f8582 [formerly 782d2cbb05d9fe391f867d33c9ae0820b3fda203] Former-commit-id: 78a21d732a68267fae930858f9e09b26ea9419b8
34 lines
716 B
Go
34 lines
716 B
Go
// Package p2p handles peer-to-peer networking for the sharding package.
|
|
package p2p
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
"github.com/ethereum/go-ethereum/event"
|
|
"github.com/ethereum/go-ethereum/log"
|
|
)
|
|
|
|
// Server is a placeholder for a shardp2p service. To be designed.
|
|
type Server struct {
|
|
feeds map[reflect.Type]*event.Feed
|
|
}
|
|
|
|
// NewServer creates a new p2p server instance.
|
|
func NewServer() (*Server, error) {
|
|
return &Server{
|
|
feeds: make(map[reflect.Type]*event.Feed),
|
|
}, nil
|
|
}
|
|
|
|
// Start the main routine for an p2p server.
|
|
func (s *Server) Start() error {
|
|
log.Info("Starting shardp2p server")
|
|
return nil
|
|
}
|
|
|
|
// Stop the main p2p loop.
|
|
func (s *Server) Stop() error {
|
|
log.Info("Stopping shardp2p server")
|
|
return nil
|
|
}
|