Skip to content

Commit

Permalink
Merge pull request #195 from icon-project/goldworm-fix-on-rev-iiss4r1
Browse files Browse the repository at this point in the history
Change AccumulatedValidationFailurePenaltyCondition from 5 to 3 after IISS4R1
  • Loading branch information
goldworm-icon authored Dec 6, 2023
2 parents e8c9193 + 20efe1c commit 2e2a00e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions icon/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ func onRevBlockAccounts2(s *chainScore, _, _ int) error {
return nil
}

// onRevision23 handles states in PreIISS4 phase
func onRevIISS4R0(s *chainScore, rev, _ int) error {
es := s.cc.GetExtensionState().(*iiss.ExtensionStateImpl)

Expand Down Expand Up @@ -346,14 +345,16 @@ func onRevIISS4R0(s *chainScore, rev, _ int) error {
return nil
}

// onRevision24 handles states in IISS4 phase
func onRevIISS4R1(s *chainScore, _, _ int) error {
es := s.cc.GetExtensionState().(*iiss.ExtensionStateImpl)

// IISS 4.0
if err := es.State.SetIISSVersion(icstate.IISSVersion4); err != nil {
return err
}
if err := es.State.SetConsistentValidationPenaltyCondition(3); err != nil {
return err
}

return nil
}

0 comments on commit 2e2a00e

Please sign in to comment.