Skip to content

Commit

Permalink
Refactor: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Dec 3, 2023
1 parent 2b819f9 commit 75240f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/protocol/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func (c *Commitment) deriveCumulativeAttestedWeight(parent *Commitment) func() {
// deriveIsAboveLatestVerifiedCommitment derives the IsAboveLatestVerifiedCommitment flag of this Commitment which is
// true if the parent is already above the latest verified Commitment or if the parent is verified and we are not.
func (c *Commitment) deriveIsAboveLatestVerifiedCommitment(parent *Commitment) func() {
return c.IsAboveLatestVerifiedCommitment.DeriveValueFrom(reactive.NewDerivedVariable3(func(_ bool, parentAboveLatestVerifiedCommitment bool, parentIsCommitted bool, isCommitted bool) bool {
return parentAboveLatestVerifiedCommitment || (parentIsCommitted && !isCommitted)
return c.IsAboveLatestVerifiedCommitment.DeriveValueFrom(reactive.NewDerivedVariable3(func(_ bool, parentAboveLatestVerifiedCommitment bool, parentIsVerified bool, isVerified bool) bool {
return parentAboveLatestVerifiedCommitment || (parentIsVerified && !isVerified)
}, parent.IsAboveLatestVerifiedCommitment, parent.IsVerified, c.IsVerified))
}

Expand Down

0 comments on commit 75240f0

Please sign in to comment.