Skip to content

Commit

Permalink
context: properly reset preBlock and preHeader
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Aug 28, 2024
1 parent d01dbcb commit 1f16fbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ func (c *Context[H]) reset(view byte, ts uint64) {
c.MyIndex, c.Priv, c.Pub = c.Config.GetKeyPair(c.Validators)

c.block = nil
c.preBlock = nil
c.header = nil
c.preHeader = nil

n := len(c.Validators)
c.ChangeViewPayloads = emptyReusableSlice(c.ChangeViewPayloads, n)
Expand Down

0 comments on commit 1f16fbe

Please sign in to comment.