@@ -240,7 +240,6 @@ insertByronTx ::
240
240
Word64 ->
241
241
ExceptT SyncNodeError (ReaderT SqlBackend m ) Word64
242
242
insertByronTx syncEnv blkId tx blockIndex = do
243
- let txId = DB. TxKey $ DB. unBlockKey blkId
244
243
disInOut <- liftIO $ getDisableInOutState syncEnv
245
244
if disInOut
246
245
then do
@@ -273,19 +272,20 @@ insertByronTx syncEnv blkId tx blockIndex = do
273
272
}
274
273
275
274
pure 0
276
- else insertByronTx' syncEnv blkId tx blockIndex
275
+ else insertByronTx' syncEnv blkId txId tx blockIndex
277
276
where
278
277
iopts = getInsertOptions syncEnv
278
+ txId = DB. TxKey $ DB. unBlockKey blkId + fromIntegral blockIndex
279
279
280
280
insertByronTx' ::
281
281
(MonadBaseControl IO m , MonadIO m ) =>
282
282
SyncEnv ->
283
283
DB. BlockId ->
284
+ DB. TxId ->
284
285
Byron. TxAux ->
285
286
Word64 ->
286
287
ExceptT SyncNodeError (ReaderT SqlBackend m ) Word64
287
- insertByronTx' syncEnv blkId tx blockIndex = do
288
- let txId = DB. TxKey $ fromIntegral $ fromIntegral (DB. unBlockId blkId) * 1000 + blockIndex
288
+ insertByronTx' syncEnv blkId txId tx blockIndex = do
289
289
resolvedInputs <- mapM (resolveTxInputs txOutTableType) (toList $ Byron. txInputs (Byron. taTx tx))
290
290
valFee <- firstExceptT annotateTx $ ExceptT $ pure (calculateTxFee (Byron. taTx tx) resolvedInputs)
291
291
lift $
@@ -324,7 +324,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
324
324
mapM_ (insertTxIn tracer txId) resolvedInputs
325
325
whenConsumeOrPruneTxOut syncEnv $
326
326
lift $
327
- DB. updateListTxOutConsumedByTxId (prepUpdate txId <$> resolvedInputs)
327
+ DB. updateListTxOutConsumedByTxId (prepUpdate <$> resolvedInputs)
328
328
-- fees are being returned so we can sum them and put them in cache to use when updating epochs
329
329
pure $ unDbLovelace $ vfFee valFee
330
330
where
@@ -340,7 +340,7 @@ insertByronTx' syncEnv blkId tx blockIndex = do
340
340
SNErrInvariant loc ei -> SNErrInvariant loc (annotateInvariantTx (Byron. taTx tx) ei)
341
341
_other -> ee
342
342
343
- prepUpdate txId (_, _, txOutId, _) = (txOutId, txId)
343
+ prepUpdate (_, _, txOutId, _) = (txOutId, txId)
344
344
345
345
insertTxOutByron ::
346
346
(MonadBaseControl IO m , MonadIO m ) =>
0 commit comments