mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 16:08:26 -05:00
Rename field ops service to att service (#9046)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -81,7 +81,7 @@ type Config struct {
|
||||
MaxRoutines int
|
||||
StateNotifier statefeed.Notifier
|
||||
ForkChoiceStore f.ForkChoicer
|
||||
OpsService *attestations.Service
|
||||
AttService *attestations.Service
|
||||
StateGen *stategen.State
|
||||
WeakSubjectivityCheckpt *ethpb.Checkpoint
|
||||
}
|
||||
@@ -139,7 +139,7 @@ func (s *Service) Start() {
|
||||
if beaconState != nil && !beaconState.IsNil() {
|
||||
log.Info("Blockchain data already exists in DB, initializing...")
|
||||
s.genesisTime = time.Unix(int64(beaconState.GenesisTime()), 0)
|
||||
s.cfg.OpsService.SetGenesisTime(beaconState.GenesisTime())
|
||||
s.cfg.AttService.SetGenesisTime(beaconState.GenesisTime())
|
||||
if err := s.initializeChainInfo(s.ctx); err != nil {
|
||||
log.Fatalf("Could not set up chain info: %v", err)
|
||||
}
|
||||
@@ -301,7 +301,7 @@ func (s *Service) initializeBeaconChain(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s.cfg.OpsService.SetGenesisTime(genesisState.GenesisTime())
|
||||
s.cfg.AttService.SetGenesisTime(genesisState.GenesisTime())
|
||||
|
||||
return genesisState, nil
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ func setupBeaconChain(t *testing.T, beaconDB db.Database) *Service {
|
||||
})
|
||||
require.NoError(t, err, "Unable to set up web3 service")
|
||||
|
||||
opsService, err := attestations.NewService(ctx, &attestations.Config{Pool: attestations.NewPool()})
|
||||
attService, err := attestations.NewService(ctx, &attestations.Config{Pool: attestations.NewPool()})
|
||||
require.NoError(t, err)
|
||||
|
||||
depositCache, err := depositcache.New()
|
||||
@@ -112,7 +112,7 @@ func setupBeaconChain(t *testing.T, beaconDB db.Database) *Service {
|
||||
AttPool: attestations.NewPool(),
|
||||
StateGen: stategen.New(beaconDB),
|
||||
ForkChoiceStore: protoarray.New(0, 0, params.BeaconConfig().ZeroHash),
|
||||
OpsService: opsService,
|
||||
AttService: attService,
|
||||
}
|
||||
|
||||
// Safe a state in stategen to purposes of testing a service stop / shutdown.
|
||||
|
||||
@@ -405,8 +405,8 @@ func (b *BeaconNode) registerBlockchainService() error {
|
||||
return err
|
||||
}
|
||||
|
||||
var opsService *attestations.Service
|
||||
if err := b.services.FetchService(&opsService); err != nil {
|
||||
var attService *attestations.Service
|
||||
if err := b.services.FetchService(&attService); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ func (b *BeaconNode) registerBlockchainService() error {
|
||||
MaxRoutines: maxRoutines,
|
||||
StateNotifier: b,
|
||||
ForkChoiceStore: b.forkChoiceStore,
|
||||
OpsService: opsService,
|
||||
AttService: attService,
|
||||
StateGen: b.stateGen,
|
||||
WeakSubjectivityCheckpt: wsCheckpt,
|
||||
})
|
||||
|
||||
@@ -147,7 +147,7 @@ func BeaconFuzzBlock(b []byte) {
|
||||
P2p: p2p,
|
||||
StateNotifier: sn,
|
||||
ForkChoiceStore: protoarray.New(0, 0, [32]byte{}),
|
||||
OpsService: ops,
|
||||
AttService: ops,
|
||||
StateGen: sgen,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user