Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Haskell-Generate/GenRustJets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@ showRustHash h = fillSep $ ((<> comma) . format <$> chunksOf 2 str_h)
rustJetCmr :: Module -> Doc a
rustJetCmr mod = vsep $
[ nest 4 (vsep ("fn cmr(&self) -> Cmr {" :
-- Temporary if statement until Bitcoin Jets have weight costs assigned to them
-- See Haskell/Simplicity/Bitcoin/Jets.hs: jetCost (BitcoinJet jt) = error "Simplicity.Bitcoin.Jets.jetCost: :TODO: Implement jets for Bitcoin and benchmark them."
if Just "Bitcoin" == moduleName mod
then ["unimplemented!(\"Bitcoin jet CMRs weights have not yet been implemented.\")"]
else
[ nest 4 (vsep ("let bytes = match self {" :
map (<>comma)
[ nest 4 (vsep
Expand Down Expand Up @@ -247,9 +242,7 @@ rustJetDecode mod =
rustJetCost :: Module -> Doc a
rustJetCost mod = vsep $
[ nest 4 (vsep ("fn cost(&self) -> Cost {" :
if modname == "Bitcoin"
then ["unimplemented!(\"Unspecified cost of Bitcoin jets\")"]
else [ nest 4 (vsep ("match self {" :
[ nest 4 (vsep ("match self {" :
map (<>comma)
[ pretty modname <> "::" <> pretty (jetName jet) <+> "=>" <+>
"Cost::from_milliweight(" <> (pretty . milliWeight $ jetCost jet) <> ")"
Expand Down
Loading