mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Rename NewService to New (#8337)
* Hide beacon operation field if it's 0
* Rename NewSerivce to New
* Revert "Hide beacon operation field if it's 0"
This reverts commit 896fa11a0b.
* Fix NewServiceRegistry
* Update slasher/detection/service.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -152,7 +152,7 @@ func TestService_InitStartStop(t *testing.T) {
|
||||
}
|
||||
// Initialize feed
|
||||
notifier := &mock.MockStateNotifier{}
|
||||
s := NewService(ctx, &Config{
|
||||
s := New(ctx, &Config{
|
||||
P2P: p,
|
||||
Chain: mc,
|
||||
StateNotifier: notifier,
|
||||
@@ -319,7 +319,7 @@ func TestService_markSynced(t *testing.T) {
|
||||
mc := &mock.ChainService{}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
s := NewService(ctx, &Config{
|
||||
s := New(ctx, &Config{
|
||||
Chain: mc,
|
||||
StateNotifier: mc.StateNotifier(),
|
||||
})
|
||||
@@ -416,7 +416,7 @@ func TestService_Resync(t *testing.T) {
|
||||
if tt.chainService != nil {
|
||||
mc = tt.chainService()
|
||||
}
|
||||
s := NewService(ctx, &Config{
|
||||
s := New(ctx, &Config{
|
||||
DB: beaconDB,
|
||||
P2P: p,
|
||||
Chain: mc,
|
||||
@@ -438,7 +438,7 @@ func TestService_Resync(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestService_Initialized(t *testing.T) {
|
||||
s := NewService(context.Background(), &Config{})
|
||||
s := New(context.Background(), &Config{})
|
||||
s.chainStarted.Set()
|
||||
assert.Equal(t, true, s.Initialized())
|
||||
s.chainStarted.UnSet()
|
||||
|
||||
Reference in New Issue
Block a user