Skip to content

Commit

Permalink
Fix byzantine validator punishment
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Aug 28, 2020
1 parent 5bc679c commit 78fbcae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/minter/minter.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (app *Blockchain) BeginBlock(req abciTypes.RequestBeginBlock) abciTypes.Res

// skip already offline candidates to prevent double punishing
candidate := app.stateDeliver.Candidates.GetCandidateByTendermintAddress(address)
if candidate == nil || candidate.Status == candidates.CandidateStatusOffline {
if candidate == nil || candidate.Status == candidates.CandidateStatusOffline || app.stateDeliver.Validators.GetByTmAddress(address) == nil {
continue
}

Expand Down

0 comments on commit 78fbcae

Please sign in to comment.