Skip to content

Commit

Permalink
Fix: addressed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Nov 2, 2023
1 parent 16ce5ce commit e9b7a2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/protocol/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func New(logger log.Logger, workers *workerpool.Group, networkEndpoint network.E
})

p.Constructed.Trigger()

p.waitEngineInitialized()
})
}

Expand All @@ -92,8 +94,6 @@ func (p *Protocol) IssueBlock(block *model.Block) error {

// Run starts the protocol.
func (p *Protocol) Run(ctx context.Context) error {
p.waitEngineInitialized()

p.Initialized.Trigger()

<-ctx.Done()
Expand Down
4 changes: 4 additions & 0 deletions pkg/storage/prunable/prunable.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ func (p *Prunable) Rollback(targetEpoch iotago.EpochIndex, pruningRange [2]iotag
return ierrors.Wrapf(err, "failed to prune slots in range [%d, %d] from target epoch %d", pruningRange[0], pruningRange[1], targetEpoch)
}

if err := p.rollbackCommitteesCandidates(targetEpoch, pruningRange[0]-1); err != nil {
return ierrors.Wrapf(err, "failed to rollback committee candidates to target epoch %d", targetEpoch)
}

lastPrunedCommitteeEpoch, err := p.rollbackCommitteeEpochs(targetEpoch+1, pruningRange[0]-1)
if err != nil {
return ierrors.Wrapf(err, "failed to rollback committee epochs to target epoch %d", targetEpoch)
Expand Down

0 comments on commit e9b7a2b

Please sign in to comment.