Skip to content

Commit

Permalink
reset the cosi aggregators and verifiers for new round
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Aug 26, 2021
1 parent e78bf1e commit 15136b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Semantic Versioning

## v0.13 Insomniac Mosquitoes

Upgrades the storage format, and optimizes memory usage.

## v0.12 Noisy Katydids, March 3, 2021

Batch transaction signatures verification with transaction version 2.
Expand Down
3 changes: 3 additions & 0 deletions kernel/cosi.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ func (chain *Chain) cosiSendAnnouncement(m *CosiAction) error {
return chain.clearAndQueueSnapshotOrPanic(s)
}
cache, final = nc, nf
chain.CosiAggregators = make(map[crypto.Hash]*CosiAggregator)
chain.CosiVerifiers = make(map[crypto.Hash]*CosiVerifier)
}
cache.Timestamp = s.Timestamp

Expand Down Expand Up @@ -367,6 +369,7 @@ func (chain *Chain) cosiHandleAnnouncement(m *CosiAction) error {
return nil
}
cache, final = nc, nf
chain.CosiVerifiers = make(map[crypto.Hash]*CosiVerifier)
}

if err := cache.ValidateSnapshot(s); err != nil {
Expand Down

0 comments on commit 15136b9

Please sign in to comment.