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:
terence tsao
2021-01-26 02:26:57 -08:00
committed by GitHub
parent a7345c1094
commit d121b19145
46 changed files with 184 additions and 184 deletions

View File

@@ -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()