Skip to content

Commit

Permalink
Use correct context for IsFinalizedBlock call (#7053)
Browse files Browse the repository at this point in the history
* Use correct context for IsFinalizedBlock call
* Merge branch 'master' into use-correct-ctx
  • Loading branch information
prestonvanloon authored Aug 19, 2020
1 parent bc20591 commit 3aa95b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon-chain/sync/rpc_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (s *Service) validateStatusMessage(ctx context.Context, msg *pb.Status) err
if finalizedAtGenesis && rootIsEqual {
return nil
}
if !s.db.IsFinalizedBlock(context.Background(), bytesutil.ToBytes32(msg.FinalizedRoot)) {
if !s.db.IsFinalizedBlock(ctx, bytesutil.ToBytes32(msg.FinalizedRoot)) {
return errInvalidFinalizedRoot
}
blk, err := s.db.Block(ctx, bytesutil.ToBytes32(msg.FinalizedRoot))
Expand Down

0 comments on commit 3aa95b9

Please sign in to comment.