Skip to content

Commit

Permalink
Only update committee cache if it doesn't have that key already (prys…
Browse files Browse the repository at this point in the history
…maticlabs#4719)

* Only update committee cache if it doesn't have that key already
  • Loading branch information
prestonvanloon authored and cryptomental committed Feb 28, 2020
1 parent e5a3fb0 commit 3ff8ae6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beacon-chain/core/helpers/committee.go
Expand Up @@ -401,6 +401,9 @@ func UpdateCommitteeCache(state *stateTrie.BeaconState, epoch uint64) error {
if err != nil {
return err
}
if _, exists, err := committeeCache.CommitteeCache.GetByKey(string(seed[:])); err == nil && exists {
return nil
}

// Store the sorted indices as well as shuffled indices. In current spec,
// sorted indices is required to retrieve proposer index. This is also
Expand Down

0 comments on commit 3ff8ae6

Please sign in to comment.