Skip to content

Commit 2545bb3

Browse files
committed
Fix consumed_tx_out for Byron
Fixes #1821
1 parent dbea349 commit 2545bb3

File tree

1 file changed

+2
-2
lines changed
  • cardano-db-sync/src/Cardano/DbSync/Era/Byron

1 file changed

+2
-2
lines changed

cardano-db-sync/src/Cardano/DbSync/Era/Byron/Insert.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
316316
mapM_ (insertTxIn tracer txId) resolvedInputs
317317
whenConsumeOrPruneTxOut syncEnv $
318318
lift $
319-
DB.updateListTxOutConsumedByTxId (prepUpdate <$> resolvedInputs)
319+
DB.updateListTxOutConsumedByTxId (prepUpdate txId <$> resolvedInputs)
320320
-- fees are being returned so we can sum them and put them in cache to use when updating epochs
321321
pure $ unDbLovelace $ vfFee valFee
322322
where
@@ -331,7 +331,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
331331
SNErrInvariant loc ei -> SNErrInvariant loc (annotateInvariantTx (Byron.taTx tx) ei)
332332
_other -> ee
333333

334-
prepUpdate (_, txId, txOutId, _) = (txOutId, txId)
334+
prepUpdate txId (_, _, txOutId, _) = (txOutId, txId)
335335

336336
insertTxOut ::
337337
(MonadBaseControl IO m, MonadIO m) =>

0 commit comments

Comments
 (0)