From b5f2616b2640a32565bc4edccad22bd2d3c74ac3 Mon Sep 17 00:00:00 2001 From: Potuz Date: Wed, 22 May 2024 08:56:15 -0300 Subject: [PATCH] use Keymanager() in validator client --- consensus-types/mock/BUILD.bazel | 2 +- validator/client/payload_attestation.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/consensus-types/mock/BUILD.bazel b/consensus-types/mock/BUILD.bazel index 741968bbcc42..e7ce82febd6f 100644 --- a/consensus-types/mock/BUILD.bazel +++ b/consensus-types/mock/BUILD.bazel @@ -9,8 +9,8 @@ go_library( "//config/fieldparams:go_default_library", "//consensus-types/interfaces:go_default_library", "//consensus-types/primitives:go_default_library", - "//proto/eth/v1:go_default_library", "//proto/engine/v1:go_default_library", + "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "@com_github_prysmaticlabs_fastssz//:go_default_library", diff --git a/validator/client/payload_attestation.go b/validator/client/payload_attestation.go index 3b405227dfd4..7df76ce2ecdf 100644 --- a/validator/client/payload_attestation.go +++ b/validator/client/payload_attestation.go @@ -39,7 +39,11 @@ func (v *validator) signPayloadAttestation(ctx context.Context, p *ethpb.Payload } // Sign the payload attestation data - sig, err := v.keyManager.Sign(ctx, signReq) + m, err := v.Keymanager() + if err != nil { + return nil, errors.Wrap(err, "could not get key manager") + } + sig, err := m.Sign(ctx, signReq) if err != nil { return nil, errors.Wrap(err, "could not sign payload attestation") }