-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mana vector fixes #2396
Mana vector fixes #2396
Conversation
# Conflicts: # packages/core/notarization/manager.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!!! I would just like to turn the activityLog to a ShrinkingMap
|
||
return weights, totalWeight | ||
} | ||
|
||
// SnapshotEpochActivity returns the activity log for snapshotting. | ||
func (c *CManaWeightProvider) SnapshotEpochActivity() (epochActivity epoch.SnapshotEpochActivity) { | ||
func (c *CManaWeightProvider) SnapshotEpochActivity(epochDiffIndex epoch.Index) (epochActivity epoch.SnapshotEpochActivity) { | ||
epochActivity = epoch.NewSnapshotEpochActivity() | ||
|
||
c.mutex.Lock() | ||
defer c.mutex.Unlock() | ||
|
||
for ei, al := range c.activityLog { | ||
al.SetEpochs.ForEach(func(nodeID identity.ID) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having ActivityLog exposing an AdvanceSet, can we create a ForEach on the activity record itself while unexporting the AdvancedSet itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I use ForEach, but it turned out that I cannot unexport SetEpochs
as the serialization stops working
…a-vector-update-fixes
manaDelay
parameter only from mana plugin. Update mana vector event has now only EI.lastConfirmed-activeEpochThreshold