Skip to content

Commit

Permalink
Delay predicateToString as much as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd34df00d committed Oct 31, 2023
1 parent b756a96 commit f02f0d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pact-core/Pact/Core/IR/Eval/RawBuiltin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,11 +1420,11 @@ coreCompose = \info b cont handler _env -> \case
createPrincipalForGuard :: (MonadGas m) => Guard FullyQualifiedName PactValue -> m Pr.Principal
createPrincipalForGuard g = do
case g of
GKeyset (KeySet ks pf) -> case (toList ks, predicateToString pf) of
([k], "keys-all") -> pure $ Pr.K k
(l, fun) -> do
GKeyset (KeySet ks pf) -> case (toList ks, pf) of
([k], KeysAll) -> pure $ Pr.K k
(l, _) -> do
h <- mkHash $ map (T.encodeUtf8 . _pubKey) l
pure $ Pr.W (hashToText h) fun
pure $ Pr.W (hashToText h) (predicateToString pf)
GKeySetRef ksn -> pure $ Pr.R ksn
GModuleGuard (ModuleGuard mn n) -> pure $ Pr.M mn n
GUserGuard (UserGuard f args) -> do
Expand Down

0 comments on commit f02f0d0

Please sign in to comment.