Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix replay BVF errors #2121

Merged
merged 1 commit into from
Jan 25, 2025
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
8 changes: 4 additions & 4 deletions src/Chainweb/Pact/PactService.hs
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ execReadOnlyReplay lowerBound maybeUpperBound = pactLabel "execReadOnlyReplay" $
"execReadOnlyReplay: missing block: " <> sshow bh
handleMissingBlock (Historical ()) = return ()
payload <- liftIO $ fromJuste <$>
lookupPayloadDataWithHeight pdb (Just $ view blockHeight bh) (view blockPayloadHash bh)
let isPayloadEmpty = V.null (view payloadDataTransactions payload)
lookupPayloadWithHeight pdb (Just $ view blockHeight bh) (view blockPayloadHash bh)
let isPayloadEmpty = V.null (_payloadWithOutputsTransactions payload)
let isUpgradeBlock = isJust $ _chainwebVersion bhdb ^? versionUpgrades . atChain (_chainId bhdb) . ix (view blockHeight bh)
liftIO $ writeIORef heightRef (view blockHeight bh)
unless (isPayloadEmpty && not isUpgradeBlock)
Expand All @@ -714,8 +714,8 @@ execReadOnlyReplay lowerBound maybeUpperBound = pactLabel "execReadOnlyReplay" $
$ runPact
$ Checkpointer.readFrom (Just $ ParentHeader bhParent) $
SomeBlockM $ Pair
(void $ Pact4.execBlock bh (CheckablePayload payload))
(void $ Pact5.execExistingBlock bh (CheckablePayload payload))
(void $ Pact4.execBlock bh (CheckablePayloadWithOutputs payload))
(void $ Pact5.execExistingBlock bh (CheckablePayloadWithOutputs payload))
)
validationFailed <- readIORef validationFailedRef
when validationFailed $
Expand Down
Loading