[bisq-network/bisq] Refactor fee estimation (#2251)
Manfred Karrer
notifications at github.com
Wed Jan 23 11:19:23 UTC 2019
ManfredKarrer commented on this pull request.
> + // selection of inputs chosen if we have increased the fee and therefor less inputs). As the increased fee might
+ // change the number of inputs we need to repeat that process until we are inside of a certain tolerance. To avoid
+ // potential endless loops we add a counter. Worst case would be that the last size we got reported is > 20% off to
+ // the real tx size but as fee estimation is anyway a educated guess in the best case we don't worry too much.
+ // If we have underpaid the tx might take longer to get confirmed.
+ @VisibleForTesting
+ static int getEstimatedTxSize(List<Coin> outputValues,
+ int initialEstimatedTxSize,
+ Coin txFeePerByte,
+ BtcWalletService btcWalletService)
+ throws InsufficientMoneyException {
+ boolean isInTolerance;
+ int estimatedTxSize = initialEstimatedTxSize;
+ int realTxSize;
+ int counter = 0;
+ do {
OK, I will add more comment.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2251#discussion_r250152569
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190123/ea9999bd/attachment-0001.html>
More information about the bisq-github
mailing list