Skip to content

Commit

Permalink
Hardcode the fee for faucet tx
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Mar 14, 2023
1 parent 44dc719 commit 5011714
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ singlePartyHeadFullLifeCycle tracer workDir node@RunningNode{networkId} hydraScr
waitFor tracer 600 [n1] $
output "HeadIsFinalized" ["utxo" .= object mempty, "headId" .= headId]
traceRemainingFunds Alice
returnAssetsToFaucet tracer node Alice
`finally` returnAssetsToFaucet tracer node Alice
where
RunningNode{nodeSocket} = node

Expand Down Expand Up @@ -209,9 +209,9 @@ returnAssetsToFaucet tracer node@RunningNode{networkId, nodeSocket} sender = do
(receivingVk, _) <- keysFor Faucet
(senderVk, senderSk) <- keysFor sender
utxo <- queryUTxOFor networkId nodeSocket QueryTip senderVk
-- TODO: 'balance' here is just `foldMap txOutValue` so it doesn't actually ballance anything.
-- How to exclude the fees from the amount? This hardcoded subtraction needs to go away
let returnBalance = (selectLovelace $ balance @Tx utxo) - 2_000_000
-- Bit ugly bit we need to subtract the fees manually here.
-- TODO: Implement the fee calculation for our smoke-tests
let returnBalance = (selectLovelace $ balance @Tx utxo) - 1_200_000
void $ sendFundsTo node (senderVk, senderSk) receivingVk returnBalance Normal (contramap FromFaucet tracer) False
traceWith tracer $ ReturningToFaucet{actor = actorName sender, returnAmount = returnBalance}

Expand Down

0 comments on commit 5011714

Please sign in to comment.