mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
Redefine cli-option --txfee: Treat it as txfee to be used
in the JM TX's instead of just for preliminary
estimations. Now it is a way to temporarily override
the tx_fees setting in joinmarket.cfg and behaves
exactly the same way as describes there.
This commit is contained in:
parent
91f978d1d8
commit
0ab5b6560c
3 changed files with 14 additions and 4 deletions
|
|
@ -29,10 +29,12 @@ def add_common_options(parser):
|
|||
type='int',
|
||||
dest='txfee',
|
||||
default=-1,
|
||||
help='number of satoshis per participant to use as the initial estimate '
|
||||
'for the total transaction fee, default=dynamically estimated, note that this is adjusted '
|
||||
'based on the estimated fee calculated after tx construction, based on '
|
||||
'policy set in joinmarket.cfg.')
|
||||
help='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.')
|
||||
parser.add_option('--recoversync',
|
||||
action='store_true',
|
||||
dest='recoversync',
|
||||
|
|
|
|||
|
|
@ -105,6 +105,10 @@ def main():
|
|||
else:
|
||||
chooseOrdersFunc = options.order_choose_fn
|
||||
|
||||
# If tx_fees are set manually by CLI argument, override joinmarket.cfg:
|
||||
if int(options.txfee) > 0:
|
||||
jm_single().config.set("POLICY", "tx_fees", str(options.txfee))
|
||||
|
||||
# Dynamically estimate a realistic fee if it currently is the default value.
|
||||
# At this point we do not know even the number of our own inputs, so
|
||||
# we guess conservatively with 2 inputs and 2 outputs each.
|
||||
|
|
|
|||
|
|
@ -114,6 +114,10 @@ def main():
|
|||
tumble_log.info("With this schedule: ")
|
||||
tumble_log.info(pprint.pformat(schedule))
|
||||
|
||||
# If tx_fees are set manually by CLI argument, override joinmarket.cfg:
|
||||
if int(options['txfee']) > 0:
|
||||
jm_single().config.set("POLICY", "tx_fees", str(options['txfee']))
|
||||
|
||||
# Dynamically estimate an expected tx fee for the whole tumbling run.
|
||||
# This is very rough: we guess with 2 inputs and 2 outputs each.
|
||||
if options['txfee'] == -1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue