From 403fba66815d0b79a68b6e9796459dca830c9531 Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Mon, 28 Feb 2022 20:50:06 +0100 Subject: [PATCH] tweak comment --- lib/core/src/Cardano/Wallet.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/src/Cardano/Wallet.hs b/lib/core/src/Cardano/Wallet.hs index 7538442b318..5aaf440e5dc 100644 --- a/lib/core/src/Cardano/Wallet.hs +++ b/lib/core/src/Cardano/Wallet.hs @@ -1822,13 +1822,18 @@ balanceTransaction -- existing 'computeSelectionLimit', but subtract the size -- of the partial tx from 'getTxMaxSize'. -- - -- FIXME: This will double-count inputs and outputs. + -- FIXME: This will double-count inputs and outputs, which + -- could make balancing of large txs fail when they + -- shouldn't. + -- -- -- We may not be able to remove the inputs and outputs -- before subtracting, however. The size of the inputs in -- the partial tx does not include witnesses. The outputs in -- the partial tx could also be bigger than coin-selection -- would estimate because of datum hashes. + -- + -- let fixedSize = BS.length $ serialisedTx partialTx tweak (Quantity maxSize) = Quantity