From 17a28e9af941bca81a5edd405ae71002fd52361c Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Fri, 17 Jan 2025 16:52:35 -0500 Subject: [PATCH] insert into cache on reads too Change-Id: Id00000007f84d7de38391d240b94068587588764 --- src/Chainweb/Pact5/Backend/ChainwebPactDb.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Chainweb/Pact5/Backend/ChainwebPactDb.hs b/src/Chainweb/Pact5/Backend/ChainwebPactDb.hs index abacd685fe..80fbf4a186 100644 --- a/src/Chainweb/Pact5/Backend/ChainwebPactDb.hs +++ b/src/Chainweb/Pact5/Backend/ChainwebPactDb.hs @@ -372,6 +372,8 @@ doReadRow mlim d k = do Pact.DModules -> BlockHandler $ lift $ lift $ Pact.chargeGasM (Pact.GModuleOp (Pact.MOpLoadModule (BS.length encodedValue))) + Pact.DUserTables {} -> do + bsPendingTx . _Just . _1 . pendingWrites %= InMem.insert d k (InMem.ReadEntry encodedValue decodedValue) _ -> return () return (Just decodedValue) where