Skip to content

Commit

Permalink
Update head slot metric after compute head (#4754)
Browse files Browse the repository at this point in the history
* Update head slot after compute head
* Merge branch 'master' into properly-update-head-metric
* Merge refs/heads/master into properly-update-head-metric
  • Loading branch information
terencechain authored Feb 5, 2020
1 parent ce79d8e commit 0180051
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions beacon-chain/blockchain/receive_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ func (s *Service) ReceiveBlockNoPubsub(ctx context.Context, block *ethpb.SignedB
s.exitPool.MarkIncluded(exit)
}

// Reports on block and fork choice metrics.
metrics.ReportSlotMetrics(blockCopy.Block.Slot, s.headSlot, s.headState)

// Log state transition data.
logStateTransitionData(blockCopy.Block)

s.epochParticipationLock.Lock()
defer s.epochParticipationLock.Unlock()
s.epochParticipation[helpers.SlotToEpoch(blockCopy.Block.Slot)] = precompute.Balances
Expand Down Expand Up @@ -173,6 +167,12 @@ func (s *Service) ReceiveBlockNoPubsub(ctx context.Context, block *ethpb.SignedB
}
}

// Reports on block and fork choice metrics.
metrics.ReportSlotMetrics(blockCopy.Block.Slot, s.headSlot, s.headState)

// Log state transition data.
logStateTransitionData(blockCopy.Block)

return nil
}

Expand Down

0 comments on commit 0180051

Please sign in to comment.