Skip to content

Commit

Permalink
Fix consumed_tx_out for Byron
Browse files Browse the repository at this point in the history
Fixes #1821
  • Loading branch information
kderme committed Aug 22, 2024
1 parent dbea349 commit 2545bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cardano-db-sync/src/Cardano/DbSync/Era/Byron/Insert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
mapM_ (insertTxIn tracer txId) resolvedInputs
whenConsumeOrPruneTxOut syncEnv $
lift $
DB.updateListTxOutConsumedByTxId (prepUpdate <$> resolvedInputs)
DB.updateListTxOutConsumedByTxId (prepUpdate txId <$> resolvedInputs)
-- fees are being returned so we can sum them and put them in cache to use when updating epochs
pure $ unDbLovelace $ vfFee valFee
where
Expand All @@ -331,7 +331,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
SNErrInvariant loc ei -> SNErrInvariant loc (annotateInvariantTx (Byron.taTx tx) ei)
_other -> ee

prepUpdate (_, txId, txOutId, _) = (txOutId, txId)
prepUpdate txId (_, _, txOutId, _) = (txOutId, txId)

insertTxOut ::
(MonadBaseControl IO m, MonadIO m) =>
Expand Down

0 comments on commit 2545bb3

Please sign in to comment.