Skip to content

Commit

Permalink
Update common.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jwinkler2083233 authored Nov 7, 2021
1 parent 1d31060 commit db03671
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consensus/hotstuff/verification/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (s *stakingKeysAggregator) getCurrent() *aggregate {
return (*aggregate)(atomic.LoadPointer(&s.current))
}

// periodically and sets aggregate struct as current using this function.
// periodically sets aggregate struct as current
func (s *stakingKeysAggregator) updateCurrent(agg *aggregate) {
atomic.StorePointer(&s.current, unsafe.Pointer(agg))
}
Expand Down Expand Up @@ -145,6 +145,7 @@ func (s *stakingKeysAggregator) aggregatedStakingKey(signers flow.IdentityList)
lastStakingKey: updatedKey,
}

// swap the struct out
s.updateCurrent(nextInner)

return updatedKey, nil
Expand Down

0 comments on commit db03671

Please sign in to comment.