File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/Ledger/Conway/Specification Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -363,8 +363,8 @@ module AcceptedByCC (currentEpoch : Epoch)
363363 acceptedStake = ∑[ x ← stakeDistr ∣ actualVotes ⁻¹ Vote.yes ] x
364364 totalStake = ∑[ x ← stakeDistr ∣ dom (actualVotes ∣^ (❴ Vote.yes ❵ ∪ ❴ Vote.no ❵)) ] x
365365
366- accepted = (acceptedStake /₀ totalStake) ≥ t
367- × (sizeActiveCC ≥ ccMinSize ⊎ (Is-nothing mT × ccMinSize ≡ 0) )
366+ accepted = Is-just mT → (acceptedStake /₀ totalStake) ≥ t
367+ × (sizeActiveCC ≥ ccMinSize)
368368```
369369
370370``` agda
@@ -667,8 +667,12 @@ opaque
667667 Is-nothing? {x = x} = All.dec (const $ no id) x
668668 where import Data.Maybe.Relation.Unary.All as All
669669
670+ Is-just? : ∀ {A : Set} {x : Maybe A} → Dec (Is-just x)
671+ Is-just? {x = x} = Any.dec (const $ yes tt) x
672+ where import Data.Maybe.Relation.Unary.Any as Any
673+
670674 acceptedByCC? : ∀ Γ es st → Dec (acceptedByCC Γ es st)
671- acceptedByCC? _ _ _ = _ ℚ.≤? _ ×-dec (_ ≥? _ ⊎-dec (Is-nothing? ×-dec ¿ _ ¿ ))
675+ acceptedByCC? _ _ _ = Is-just? →-dec ( _ ℚ.≤? _ ×-dec (_ ≥? _))
672676
673677 acceptedByDRep? : ∀ Γ es st → Dec (acceptedByDRep Γ es st)
674678 acceptedByDRep? _ _ _ = _ ℚ.≤? _
You can’t perform that action at this time.
0 commit comments