Skip to content

Commit 64acefe

Browse files
WhatisRTSoupstraw
andauthored
Replace a call to error in our FFI with a safe alternative (#650)
* Replace a call to `error` in our FFI with a safe alternative There was no need to be unsafe here. Our code just happened to not match on that proof, but this could have broken at any time when doing refactoring. In the Consensus spec, this actually caused a crash. * Update src/Ledger/Conway/Foreign/HSLedger/ExternalStructures.agda Co-authored-by: Joosep Jääger <joosep.jaager@gmail.com> --------- Co-authored-by: Joosep Jääger <joosep.jaager@gmail.com>
1 parent 2566862 commit 64acefe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ledger/Conway/Foreign/HSLedger/ExternalStructures.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ instance
2222
{ Implementation
2323
; isSigned = λ a b m extIsSigned (HSVKey.hvkVKey a) b m ≡ true
2424
; sign = λ _ _ zero
25-
-- we can't prove these properties since the functions are provided by the Haskell implementation
25+
-- we can't prove correctness since the function is provided by the Haskell implementation
2626
; isSigned-correct = error "isSigned-correct evaluated"
27-
; Dec-isSigned = λ { {vk} {ser} {sig} ⁇ (extIsSigned (HSVKey.hvkVKey vk) ser sig because error "Dec-isSigned evaluated") }
27+
; Dec-isSigned = ⁇ (_ ≟ _)
2828
}
2929

3030
-- No P2 scripts for now

0 commit comments

Comments
 (0)