Skip to content

Commit

Permalink
Do not recompute integrity hash (#1619)
Browse files Browse the repository at this point in the history
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.

---

* [x] CHANGELOG update not needed
* [x] Documentation update not needed
* [x] Haddocks update not needed
* [x] No new TODOs introduced; removed one

Signed-off-by: Sasha Bogicevic <[email protected]>
  • Loading branch information
ch1bo authored Sep 11, 2024
1 parent d4b3cbc commit 7025d78
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hydra-node/src/Hydra/Chain/Direct/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -94,7 +93,6 @@ import Hydra.Cardano.Api (
fromLedgerUTxO,
getChainPoint,
makeShelleyAddress,
recomputeIntegrityHash,
shelleyAddressInEra,
toLedgerAddr,
toLedgerTx,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7025d78

Please sign in to comment.