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:
terence tsao
2021-06-16 14:48:56 -07:00
committed by GitHub
parent 7d4418e2fe
commit 3c0a9455a2
4 changed files with 9 additions and 9 deletions

View File

@@ -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
}

View File

@@ -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.

View File

@@ -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,
})

View File

@@ -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 {