Skip to content

Commit

Permalink
Throw out PactService state changes in readFrom
Browse files Browse the repository at this point in the history
Change-Id: Id2d8c18ab4e82aa0579ea48727d8f881887c7227
  • Loading branch information
edmundnoble committed Mar 9, 2024
1 parent c7311ec commit e361bbf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Chainweb/Pact/PactService/Checkpointer.hs
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ import Control.Lens hiding ((:>))
import Control.Monad
import Control.Monad.Catch
import Control.Monad.Reader
import Control.Monad.State

import Data.IORef
import Data.Maybe
@@ -128,9 +129,10 @@ readFrom
readFrom ph doRead = do
cp <- view psCheckpointer
pactParent <- getPactParent ph
withPactState $ \runPact ->
_cpReadFrom (_cpReadCp cp) ph $
(\dbenv -> runPact $ runPactBlockM pactParent dbenv doRead)
s <- get
e <- ask
liftIO $ _cpReadFrom (_cpReadCp cp) ph $
(\dbenv -> evalPactServiceM s e $ runPactBlockM pactParent dbenv doRead)

-- here we cheat, making the genesis block header's parent the genesis
-- block header, only for Pact's information, *not* for the checkpointer;

0 comments on commit e361bbf

Please sign in to comment.