openoms / joininbox

A terminal based graphical menu for JoinMarket
MIT License
153 stars 20 forks source link

txfee=1000 is interpreted as confimation target instead of 1 sat/byte #64

Closed openoms closed 3 years ago

openoms commented 3 years ago

[In reply to openoms] Yes it needs to be confirmed. I have run into some problems with using -f 1000 in the past although that may have to do with the fee rate being less than the relay minimum of 1000 sat/kw and not the case @ThePresidents described. [In reply to takinbrrrr] confirmed the issue:

  -f TXFEE, --txfee=TXFEE
                        Bitcoin miner tx_fee to use for transaction(s). A
                        number higher than 1000 is used as "satoshi per KB" tx
                        fee. A number lower than that uses the dynamic fee
                        estimation of your blockchain provider as confirmation
                        target. This temporarily overrides the "tx_fees"
                        setting in your joinmarket.cfg. Works the same way as
                        described in it. Check it for examples.

Examples:

(jmvenv):~/joinmarket-clientserver/scripts$ python sendpayment.py -m 2 -N 0 signet 0 tb1qj9dvvkvgd5tfp9w2jxazzl8lszy8rulhupfhmm --txfee=1000
User data location: /home/joinmarket/.joinmarket/
[INFO]  starting sendpayment
Enter passphrase to decrypt wallet: 
[INFO]  Using bitcoin network feerate for 1000 block confirmation target (randomized for privacy): 1050 sat/vkB (1.0 sat/vB)
[INFO]  Using a fee of: 0.00000759 BTC (759 sat).

Vs.:

(jmvenv):~/joinmarket-clientserver/scripts$ -m 2 -N 0 signet 0 tb1qj9dvvkvgd5tfp9w2jxazzl8lszy8rulhupfhmm --txfee=1001
User data location: /home/joinmarket/.joinmarket/
[INFO]  starting sendpayment
Enter passphrase to decrypt wallet: 
[INFO]  Using this manually set tx feerate (randomized for privacy): 1134 sat/vkB (1.1 sat/vB).
[INFO]  Using a fee of: 0.00000820 BTC (820 sat).
[INFO]  Got signed transaction:

Also shows that the --txfee option works ok on the end. I will solve this on JoininBox by adding 1 to the --txfee option if 1 sat/byte is used. Not a big issue currently since the 1000 block confimation target is low anyway.