[input-output-hk/cardano-sl] [CBR-220] Fees included option (sketch) (#2983)

> I’m not sure that’s how the logic flows. With the fee estimation endpoint, we don’t get a transaction back. We just get a coin-amount of the estimated fee.

> Likewise, we don’t submit a transaction, we submit a Payment that is converted into a Transaction via the input selection policy, etc.

Right, and that’s precisely the problem. The logic above reads something like

«`
let newPayment = … twiddle with outputs, reducing the m…
newTransaction submitTx newPayment
«`

Unless I’m missing the point (entirely possible) — but `newTransaction` will not have any information that these outputs are supposed to have been adjusted for fees. As far as it is concerned, this is just another payment request, albeit for slightly smaller outputs. So it will now select inputs from the UTxO to cover that payment request, and it will construct a transaction in which the sender pays the transaction fee. So now the sender is paying fees _and_ the recipient is receiving less.

Запись редактировалась последний раз: May 31, 2018, 7:50 am