Skip to content

Commit

Permalink
Merge pull request #1053 from input-output-hk/retry-on-query-exception
Browse files Browse the repository at this point in the history
Use QueryTip for local state queries
  • Loading branch information
v0d1ch committed Sep 15, 2023
2 parents fcb8897 + 198f3e8 commit ec6c7a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,11 @@ changes.

## [0.13.0] - UNRELEASED

- Query at the tip for local cardano-node queries. We witnessed these queries
failing in case of a rollback and always querying at the tip seems to fix
this.


- **BREAKING** Changes to `hydra-plutus` scripts.

- Add option to draft a commit tx using inline datums.
Expand Down
6 changes: 3 additions & 3 deletions hydra-node/src/Hydra/Chain/Direct.hs
Expand Up @@ -154,9 +154,9 @@ mkTinyWallet tracer config = do
point <- case queryPoint of
QueryAt point -> pure point
QueryTip -> queryTip networkId nodeSocket
walletUTxO <- Ledger.unUTxO . toLedgerUTxO <$> queryUTxO networkId nodeSocket (QueryAt point) [address]
BundleAsShelleyBasedProtocolParameters _ pparams <- queryProtocolParameters networkId nodeSocket (QueryAt point)
systemStart <- querySystemStart networkId nodeSocket (QueryAt point)
walletUTxO <- Ledger.unUTxO . toLedgerUTxO <$> queryUTxO networkId nodeSocket QueryTip [address]
BundleAsShelleyBasedProtocolParameters _ pparams <- queryProtocolParameters networkId nodeSocket QueryTip
systemStart <- querySystemStart networkId nodeSocket QueryTip
epochInfo <- queryEpochInfo
pure $ WalletInfoOnChain{walletUTxO, pparams, systemStart, epochInfo, tip = point}

Expand Down

0 comments on commit ec6c7a2

Please sign in to comment.