mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
parent
f342224410
commit
ebb0e398d3
@ -2,11 +2,11 @@ package initialsync
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
peer "github.com/libp2p/go-libp2p-peer"
|
||||
"github.com/prysmaticlabs/go-ssz"
|
||||
b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
|
||||
|
@ -3,7 +3,6 @@ package sync
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
"io/ioutil"
|
||||
"reflect"
|
||||
"strconv"
|
||||
@ -11,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/libp2p/go-libp2p-core/network"
|
||||
peer "github.com/libp2p/go-libp2p-peer"
|
||||
"github.com/prysmaticlabs/go-ssz"
|
||||
b "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
|
||||
|
@ -459,6 +459,7 @@ func (b *BeaconNode) registerRPCService(ctx *cli.Context) error {
|
||||
OperationService: operationService,
|
||||
POWChainService: web3Service,
|
||||
SyncService: syncChecker,
|
||||
DepositCache: b.depositCache,
|
||||
})
|
||||
|
||||
return b.services.RegisterService(rpcService)
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/cache/depositcache"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
||||
blockchain "github.com/prysmaticlabs/prysm/beacon-chain/deprecated-blockchain"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/operations"
|
||||
@ -86,6 +87,7 @@ type Service struct {
|
||||
incomingAttestation chan *ethpb.Attestation
|
||||
credentialError error
|
||||
p2p p2p.Broadcaster
|
||||
depositCache *depositcache.DepositCache
|
||||
}
|
||||
|
||||
// Config options for the beacon node RPC server.
|
||||
@ -99,6 +101,7 @@ type Config struct {
|
||||
OperationService operationService
|
||||
SyncService sync.Checker
|
||||
Broadcaster p2p.Broadcaster
|
||||
DepositCache *depositcache.DepositCache
|
||||
}
|
||||
|
||||
// NewRPCService creates a new instance of a struct implementing the BeaconServiceServer
|
||||
@ -117,6 +120,7 @@ func NewRPCService(ctx context.Context, cfg *Config) *Service {
|
||||
port: cfg.Port,
|
||||
withCert: cfg.CertFlag,
|
||||
withKey: cfg.KeyFlag,
|
||||
depositCache: cfg.DepositCache,
|
||||
canonicalStateChan: make(chan *pbp2p.BeaconState, params.BeaconConfig().DefaultBufferSize),
|
||||
incomingAttestation: make(chan *ethpb.Attestation, params.BeaconConfig().DefaultBufferSize),
|
||||
}
|
||||
@ -174,6 +178,7 @@ func (s *Service) Start() {
|
||||
powChainService: s.powChainService,
|
||||
operationService: s.operationService,
|
||||
canonicalStateChan: s.canonicalStateChan,
|
||||
depositCache: s.depositCache,
|
||||
}
|
||||
attesterServer := &AttesterServer{
|
||||
beaconDB: s.beaconDB,
|
||||
@ -187,6 +192,7 @@ func (s *Service) Start() {
|
||||
chainService: s.chainService,
|
||||
canonicalStateChan: s.canonicalStateChan,
|
||||
powChainService: s.powChainService,
|
||||
depositCache: s.depositCache,
|
||||
}
|
||||
nodeServer := &NodeServer{
|
||||
beaconDB: s.beaconDB,
|
||||
|
Loading…
Reference in New Issue
Block a user