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 2cc3d65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,8 @@ 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
-- TODO: a bit ugly bit we need to subtract the fees manually here
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 2cc3d65

Please sign in to comment.