2021-07-22 17:13:18 +00:00
|
|
|
// Package node defines a gRPC node service implementation, providing
|
2020-10-14 06:11:11 +00:00
|
|
|
// useful endpoints for checking a node's sync status, peer info,
|
|
|
|
// genesis data, and version information.
|
2021-07-02 15:54:52 +00:00
|
|
|
package node
|
2020-10-14 06:11:11 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/sync"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Server defines a server implementation of the gRPC Node service,
|
|
|
|
// providing RPC endpoints for verifying a beacon node's sync status, genesis and
|
|
|
|
// version information.
|
|
|
|
type Server struct {
|
|
|
|
SyncChecker sync.Checker
|
|
|
|
Server *grpc.Server
|
|
|
|
BeaconDB db.ReadOnlyDatabase
|
|
|
|
PeersFetcher p2p.PeersProvider
|
|
|
|
PeerManager p2p.PeerManager
|
2021-01-14 20:48:40 +00:00
|
|
|
MetadataProvider p2p.MetadataProvider
|
2020-10-14 06:11:11 +00:00
|
|
|
GenesisTimeFetcher blockchain.TimeFetcher
|
2021-01-12 17:17:20 +00:00
|
|
|
HeadFetcher blockchain.HeadFetcher
|
2020-10-14 06:11:11 +00:00
|
|
|
}
|