mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
add custom headers to DomainData requests (#11767)
Co-authored-by: Nishant Das <nishdas93@gmail.com>
This commit is contained in:
parent
e957edcb12
commit
bbe003720c
@ -83,6 +83,7 @@ go_library(
|
||||
"@org_golang_google_grpc//:go_default_library",
|
||||
"@org_golang_google_grpc//codes:go_default_library",
|
||||
"@org_golang_google_grpc//credentials:go_default_library",
|
||||
"@org_golang_google_grpc//metadata:go_default_library",
|
||||
"@org_golang_google_grpc//resolver:go_default_library",
|
||||
"@org_golang_google_grpc//status:go_default_library",
|
||||
"@org_golang_google_protobuf//proto:go_default_library",
|
||||
|
@ -45,6 +45,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/trace"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
@ -604,8 +605,14 @@ func (v *validator) UpdateDuties(ctx context.Context, slot types.Slot) error {
|
||||
v.logDuties(slot, v.duties.CurrentEpochDuties)
|
||||
|
||||
// Non-blocking call for beacon node to start subscriptions for aggregators.
|
||||
// Make sure to copy metadata into a new context
|
||||
md, exists := metadata.FromOutgoingContext(ctx)
|
||||
ctx = context.Background()
|
||||
if exists {
|
||||
ctx = metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
go func() {
|
||||
if err := v.subscribeToSubnets(context.Background(), resp); err != nil {
|
||||
if err := v.subscribeToSubnets(ctx, resp); err != nil {
|
||||
log.WithError(err).Error("Failed to subscribe to subnets")
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user