From 62ae22e3f953a1800b0018cd6eb499021f0af917 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Wed, 22 Jul 2020 09:20:20 -0700 Subject: [PATCH] Use correct context for chainHeadRetrieval (#6678) * Use correct context for chainHeadRetrieval * Merge refs/heads/master into fix-context --- beacon-chain/rpc/beacon/blocks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/rpc/beacon/blocks.go b/beacon-chain/rpc/beacon/blocks.go index 379b25d93..5dc65a3a5 100644 --- a/beacon-chain/rpc/beacon/blocks.go +++ b/beacon-chain/rpc/beacon/blocks.go @@ -226,7 +226,7 @@ func (bs *Server) StreamChainHead(_ *ptypes.Empty, stream ethpb.BeaconChain_Stre select { case event := <-stateChannel: if event.Type == statefeed.BlockProcessed { - res, err := bs.chainHeadRetrieval(bs.Ctx) + res, err := bs.chainHeadRetrieval(stream.Context()) if err != nil { return status.Errorf(codes.Internal, "Could not retrieve chain head: %v", err) }