Skip to content

Commit

Permalink
Fix flags validation in offline detector (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidenaio authored May 11, 2021
1 parent 787ab5d commit 1d61fa1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions blockchain/offline_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ func (dt *OfflineDetector) ValidateBlock(head *types.Header, block *types.Block)
if !head.Flags().HasFlag(types.OfflinePropose) || *prevAddr != *addr {
return errors.New("no offline proposal found")
}
if !block.Header.Flags().HasFlag(types.IdentityUpdate) {
return errors.New("if OfflineCommit is set, IdentityUpdate should be set too")
}

if !dt.verifyOfflineProposing(block.Header.ParentHash()) {
return errors.New(fmt.Sprintf("addr %v should not be set offline, block %v", addr.Hex(), block.Hash().Hex()))
Expand Down

0 comments on commit 1d61fa1

Please sign in to comment.