[bisq-network/bisq] Refactor BtcWalletService to let api override fee rates (#4896)

chimp1984 notifications at github.com
Mon Dec 21 01:27:41 CET 2020


@chimp1984 approved this pull request.

utACK

> -        Transaction txWithBtcFee = btcWalletService.completePreparedBsqTx(preparedTx, true, opReturnData);
+        Transaction txWithBtcFee = btcWalletService.completePreparedBsqTx(preparedTx, opReturnData);

It is the users responsibility and does not cause harm to others if he set a too low fee and need to resynce/redo the tx. I guess it was set to fee service rate initially but later changed... But yes, there might be arguments pro and con...

> @@ -487,8 +499,6 @@ public Transaction completePreparedBsqTx(Transaction preparedBsqTx,
         int sigSizePerInput = 106;
         // typical size for a tx with 2 inputs
         int txVsizeWithUnsignedInputs = 203;
-        // If useCustomTxFee we allow overriding the estimated fee from preferences
-        Coin txFeePerVbyte = useCustomTxFee ? getTxFeeForWithdrawalPerVbyte() : feeService.getTxFeePerVbyte();

The name of useCustomTxFee was badly choosen. The intention was that for certain important transactions we want to use always the fee service (like in trade txs). I think in some BSQ txs that was the case earlier as well but got changed later as BSQ txs do not cause harm to other peers in case the fee was too low set.

So intention was to have an option to enforce usage of the fee service independent of what user has set in preferences. The false case would have done that. The true case will use whatever the user has set in preferences.

-- 
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/4896#pullrequestreview-556077510
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201220/cdcc1ede/attachment.htm>


More information about the bisq-github mailing list