Skip to content

Commit

Permalink
Remove PartySignatureVerificationFailed since it is not used
Browse files Browse the repository at this point in the history
This change also reduces the size of or script which is needed because
of decommits which made it too large.
  • Loading branch information
v0d1ch committed May 29, 2024
1 parent 1b4635d commit 2cb99a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions hydra-plutus/src/Hydra/Contract/Head.hs
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,8 @@ verifySnapshotSignature parties headId snapshotNumber utxoHash utxoToDecommitHas
{-# INLINEABLE verifySnapshotSignature #-}

verifyPartySignature :: CurrencySymbol -> SnapshotNumber -> BuiltinByteString -> BuiltinByteString -> Party -> Signature -> Bool
verifyPartySignature headId snapshotNumber utxoHash utxoToDecommitHash party signed =
traceIfFalse $(errorCode PartySignatureVerificationFailed) $
verifyEd25519Signature (vkey party) message signed
verifyPartySignature headId snapshotNumber utxoHash utxoToDecommitHash party =
verifyEd25519Signature (vkey party) message
where
message =
-- TODO: document CDDL format, either here or in 'Hydra.Snapshot.getSignableRepresentation'
Expand Down
8 changes: 3 additions & 5 deletions hydra-plutus/src/Hydra/Contract/HeadError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ data HeadError
| NoOutputDatumError
| UnexpectedNonInlineDatum
| SignatureVerificationFailed
| PartySignatureVerificationFailed
| NotPayingToHead
| NotAllValueCollected
| SnapshotNumberMismatch
Expand Down Expand Up @@ -83,7 +82,6 @@ instance ToErrorCode HeadError where
NoOutputDatumError -> "H32"
UnexpectedNonInlineDatum -> "H33"
SignatureVerificationFailed -> "H34"
PartySignatureVerificationFailed -> "H35"
NotPayingToHead -> "H36"
NotAllValueCollected -> "H37"
SnapshotNumberMismatch -> "H38"
NotPayingToHead -> "H35"
NotAllValueCollected -> "H36"
SnapshotNumberMismatch -> "H37"

0 comments on commit 2cb99a3

Please sign in to comment.