From e4779ff05cf4bb134b0a7ab4c389cbc6a0191580 Mon Sep 17 00:00:00 2001 From: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:29:28 +0400 Subject: [PATCH 1/5] Update simulators/eth2/common/clients/beacon.go --- simulators/eth2/common/clients/beacon.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simulators/eth2/common/clients/beacon.go b/simulators/eth2/common/clients/beacon.go index 09a6ac5918..c732f2978b 100644 --- a/simulators/eth2/common/clients/beacon.go +++ b/simulators/eth2/common/clients/beacon.go @@ -158,9 +158,9 @@ func (bn *BeaconClient) Init(ctx context.Context) error { func (bn *BeaconClient) Shutdown() error { if managedClient, ok := bn.Client.(ManagedClient); !ok { return fmt.Errorf("attempted to shutdown an unmanaged client") - } else { - return managedClient.Shutdown() - } + } + return managedClient.Shutdown() + } func (bn *BeaconClient) ENR(parentCtx context.Context) (string, error) { From 619a1ac4785b0163150edd8e5cf1d40edfbcedd4 Mon Sep 17 00:00:00 2001 From: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:30:18 +0400 Subject: [PATCH 2/5] Update simulators/eth2/common/builder/mock/options.go --- simulators/eth2/common/builder/mock/options.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simulators/eth2/common/builder/mock/options.go b/simulators/eth2/common/builder/mock/options.go index 31586b8d35..879a334829 100644 --- a/simulators/eth2/common/builder/mock/options.go +++ b/simulators/eth2/common/builder/mock/options.go @@ -420,9 +420,8 @@ func genPayloadAttributesInvalidator( pa.Withdrawals = pa.Withdrawals[1:] } return true, nil - } else { - return false, fmt.Errorf("unable to invalidate: no withdrawals") } + return false, fmt.Errorf("unable to invalidate: no withdrawals") case INVALIDATE_ATTR_EXTRA_WITHDRAWAL: if pa.Withdrawals == nil { pa.Withdrawals = make([]*types.Withdrawal, 0) From 525ddf5e1aa93411a40c950214f497cb59acd87a Mon Sep 17 00:00:00 2001 From: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:30:28 +0400 Subject: [PATCH 3/5] Update simulators/eth2/common/clients/beacon.go --- simulators/eth2/common/clients/beacon.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/simulators/eth2/common/clients/beacon.go b/simulators/eth2/common/clients/beacon.go index c732f2978b..1de8c06c32 100644 --- a/simulators/eth2/common/clients/beacon.go +++ b/simulators/eth2/common/clients/beacon.go @@ -110,10 +110,9 @@ func (bn *BeaconClient) Init(ctx context.Context) error { if spec, err := SpecFromConfig(cfg); err != nil { errs <- err return - } else { - bn.Config.Spec = spec - return } + bn.Config.Spec = spec + return } select { case <-ctx.Done(): From 8ef8f62d7f1a90c50c9483a633ffc6c658a871c6 Mon Sep 17 00:00:00 2001 From: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:30:34 +0400 Subject: [PATCH 4/5] Update simulators/eth2/common/clients/execution.go --- simulators/eth2/common/clients/execution.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/simulators/eth2/common/clients/execution.go b/simulators/eth2/common/clients/execution.go index 9f1e2a4ffe..49cd0117a1 100644 --- a/simulators/eth2/common/clients/execution.go +++ b/simulators/eth2/common/clients/execution.go @@ -235,9 +235,8 @@ func (en *ExecutionClient) Init(ctx context.Context) error { func (en *ExecutionClient) Shutdown() error { if managedClient, ok := en.Client.(ManagedClient); !ok { return fmt.Errorf("attempted to shutdown an unmanaged client") - } else { - return managedClient.Shutdown() } + return managedClient.Shutdown() } func (en *ExecutionClient) IsRunning() bool { From 799f5f0db5077579ad7048add9190010a16e6ee9 Mon Sep 17 00:00:00 2001 From: 4rgon4ut Date: Tue, 18 Jul 2023 14:35:11 +0300 Subject: [PATCH 5/5] chore(libdocker): logging instead of printing --- internal/libdocker/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/libdocker/builder.go b/internal/libdocker/builder.go index 0479a58136..d48a359fc3 100644 --- a/internal/libdocker/builder.go +++ b/internal/libdocker/builder.go @@ -110,10 +110,10 @@ func (b *Builder) BuildImage(ctx context.Context, name string, fsys fs.FS) error } func (b *Builder) buildConfig(ctx context.Context, name string) docker.BuildImageOptions { - fmt.Println("buildConfig") + b.logger.Info("buildConfig") nocache := false if b.config.NoCachePattern != nil { - fmt.Println(b.config.NoCachePattern) + b.logger.Info("NoCachePattern: ", b.config.NoCachePattern.String()) nocache = b.config.NoCachePattern.MatchString(name) } opts := docker.BuildImageOptions{