Skip to content

Commit

Permalink
Slightly increase the hard-coded fee to return to faucet address
Browse files Browse the repository at this point in the history
To work for sanchonet
  • Loading branch information
ffakenz committed Apr 2, 2024
1 parent 6c0b994 commit fdc23db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions hydra-cluster/src/Hydra/Cluster/Faucet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,14 @@ returnFundsToFaucet tracer node@RunningNode{networkId, nodeSocket} sender = do

(senderVk, senderSk) <- keysFor sender
utxo <- queryUTxOFor networkId nodeSocket QueryTip senderVk

retryOnExceptions tracer $ do
let utxoValue = balance @Tx utxo
let allLovelace = selectLovelace utxoValue
-- select tokens other than ADA here so we can burn it afterwards
let otherTokens = filterValue (/= AdaAssetId) utxoValue
-- XXX: Using a hard-coded high-enough value to satisfy the min utxo value.
-- NOTE: We use the faucet address as the change deliberately here.
fee <- calculateTxFee node senderSk utxo faucetAddress 1_000_000
fee <- calculateTxFee node senderSk utxo faucetAddress 1_500_000
let returnBalance = allLovelace - fee
tx <- sign senderSk <$> buildTxBody utxo faucetAddress returnBalance otherTokens
submitTransaction networkId nodeSocket tx
Expand Down
1 change: 1 addition & 0 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ singlePartyHeadFullLifeCycle tracer workDir node hydraScriptsTxId =
waitFor hydraTracer (10 * blockTime) [n1] $
output "HeadIsFinalized" ["utxo" .= toJSON utxoToCommit, "headId" .= headId]
traceRemainingFunds Alice
traceRemainingFunds AliceFunds
where
hydraTracer = contramap FromHydraNode tracer

Expand Down

0 comments on commit fdc23db

Please sign in to comment.