From 6d2595c7cc223a85ce4cc4dea1de1ffb355beac7 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Tue, 10 Sep 2024 13:50:50 +0200 Subject: [PATCH] Do not recompute integrity hash This is not needed anymore as we are not converting between Babbage and Conway transactions anymore. Consequently the TODO comment is also not needed as the upgradeTx / conversion was removed. Signed-off-by: Sasha Bogicevic --- hydra-node/src/Hydra/Chain/Direct/Wallet.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hydra-node/src/Hydra/Chain/Direct/Wallet.hs b/hydra-node/src/Hydra/Chain/Direct/Wallet.hs index 15ac910ca39..b6b3dfc3e7e 100644 --- a/hydra-node/src/Hydra/Chain/Direct/Wallet.hs +++ b/hydra-node/src/Hydra/Chain/Direct/Wallet.hs @@ -63,7 +63,6 @@ import Cardano.Ledger.Core qualified as Core import Cardano.Ledger.Core qualified as Ledger import Cardano.Ledger.Crypto (HASH, StandardCrypto) import Cardano.Ledger.Hashes (EraIndependentTxBody) -import Cardano.Ledger.Plutus.Language (Language (PlutusV2)) import Cardano.Ledger.SafeHash qualified as SafeHash import Cardano.Ledger.Shelley.API (unUTxO) import Cardano.Ledger.Shelley.API qualified as Ledger @@ -94,7 +93,6 @@ import Hydra.Cardano.Api ( fromLedgerUTxO, getChainPoint, makeShelleyAddress, - recomputeIntegrityHash, shelleyAddressInEra, toLedgerAddr, toLedgerTx, @@ -181,11 +179,9 @@ newTinyWallet tracer networkId (vk, sk) queryWalletInfo queryEpochInfo querySome -- We query pparams here again as it's possible that a hardfork -- occurred and the pparams changed. pparams <- querySomePParams - pure $ do - -- TODO: request re-export of upgradeTx in cardano-ledger-api - let conwayTx = toLedgerTx partialTx - coverFee_ pparams systemStart epochInfo ledgerLookupUTxO walletUTxO conwayTx - <&> fromLedgerTx . recomputeIntegrityHash pparams [PlutusV2] + pure $ + fromLedgerTx + <$> coverFee_ pparams systemStart epochInfo ledgerLookupUTxO walletUTxO (toLedgerTx partialTx) , reset = initialize >>= atomically . writeTVar walletInfoVar , update = \header txs -> do let point = getChainPoint header