option rename: --tx-confs -> --fee-estimate-confs
This change breaks compatibility. Scripts may need to be adjusted.
This commit is contained in:
parent
1e983497c7
commit
c15c97a95e
6 changed files with 13 additions and 13 deletions
|
|
@ -68,7 +68,7 @@ class GlobalContext(Lockable):
|
|||
usr_randchars = 30
|
||||
|
||||
tx_fee_adj = 1.0
|
||||
tx_confs = 3
|
||||
fee_estimate_confs = 3
|
||||
|
||||
# Constant vars - some of these might be overridden in opts.py, but they don't change thereafter
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ class GlobalContext(Lockable):
|
|||
'debug',
|
||||
'minconf',
|
||||
'quiet',
|
||||
'tx_confs',
|
||||
'fee_estimate_confs',
|
||||
'tx_fee_adj',
|
||||
'use_internal_keccak_module',
|
||||
'usr_randchars' )
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ opts_data = {
|
|||
-a, --tx-fee-adj= f Adjust transaction fee by factor 'f' (see below)
|
||||
-B, --no-blank Don't blank screen before displaying unspent outputs
|
||||
-c, --comment-file=f Source the transaction's comment from file 'f'
|
||||
-C, --tx-confs= c Desired number of confirmations for fee estimation
|
||||
(default: {g.tx_confs})
|
||||
-C, --fee-estimate-confs=c Desired number of confirmations for fee estimation
|
||||
(default: {g.fee_estimate_confs})
|
||||
-d, --outdir= d Specify an alternate directory 'd' for output
|
||||
-D, --contract-data=D Path to hex-encoded contract data (ETH only)
|
||||
-E, --fee-estimate-mode=M Specify the network fee estimate mode. Choices:
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ opts_data = {
|
|||
brainwallet input
|
||||
-B, --no-blank Don't blank screen before displaying unspent outputs
|
||||
-c, --comment-file= f Source the transaction's comment from file 'f'
|
||||
-C, --tx-confs= c Desired number of confirmations for fee estimation
|
||||
(default: {g.tx_confs})
|
||||
-C, --fee-estimate-confs=c Desired number of confirmations for fee estimation
|
||||
(default: {g.fee_estimate_confs})
|
||||
-d, --outdir= d Specify an alternate directory 'd' for output
|
||||
-D, --contract-data= D Path to hex-encoded contract data (ETH only)
|
||||
-e, --echo-passphrase Print passphrase to screen when typing it
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class bitcoin_core_daemon(CoinDaemon):
|
|||
return ('importaddress',coinaddr,lbl,False)
|
||||
|
||||
def estimatefee_args(self,rpc):
|
||||
return (opt.tx_confs,)
|
||||
return (opt.fee_estimate_confs,)
|
||||
|
||||
def sigfail_errmsg(self,e):
|
||||
return e.args[0]
|
||||
|
|
@ -143,7 +143,7 @@ class bitcoin_cash_node_daemon(bitcoin_core_daemon):
|
|||
return ('importaddress',coinaddr,lbl,False)
|
||||
|
||||
def estimatefee_args(self,rpc):
|
||||
return () if rpc.daemon_version >= 190100 else (opt.tx_confs,)
|
||||
return () if rpc.daemon_version >= 190100 else (opt.fee_estimate_confs,)
|
||||
|
||||
def sigfail_errmsg(self,e):
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class New(Base,TxBase.New):
|
|||
|
||||
async def get_rel_fee_from_network(self):
|
||||
try:
|
||||
ret = await self.rpc.call('estimatesmartfee',opt.tx_confs,opt.fee_estimate_mode.upper())
|
||||
ret = await self.rpc.call('estimatesmartfee',opt.fee_estimate_confs,opt.fee_estimate_mode.upper())
|
||||
fee_per_kb = ret['feerate'] if 'feerate' in ret else -2
|
||||
fe_type = 'estimatesmartfee'
|
||||
except:
|
||||
|
|
@ -58,7 +58,7 @@ class New(Base,TxBase.New):
|
|||
from_decimal = True )
|
||||
if opt.verbose:
|
||||
msg(fmt(f"""
|
||||
{fe_type.upper()} fee for {opt.tx_confs} confirmations: {fee_per_kb} {self.coin}/kB
|
||||
{fe_type.upper()} fee for {opt.fee_estimate_confs} confirmations: {fee_per_kb} {self.coin}/kB
|
||||
TX size (estimated): {tx_size} bytes
|
||||
Fee adjustment factor: {opt.tx_fee_adj:.2f}
|
||||
Absolute fee (fee_per_kb * adj_factor * tx_size / 1024): {ret} {self.coin}
|
||||
|
|
|
|||
|
|
@ -151,13 +151,13 @@ class New(Base):
|
|||
else:
|
||||
desc = 'Network-estimated ({}, {} conf{})'.format(
|
||||
opt.fee_estimate_mode.upper(),
|
||||
pink(str(opt.tx_confs)),
|
||||
suf(opt.tx_confs) )
|
||||
pink(str(opt.fee_estimate_confs)),
|
||||
suf(opt.fee_estimate_confs) )
|
||||
fee_per_kb,fe_type = await self.get_rel_fee_from_network()
|
||||
|
||||
if fee_per_kb < 0:
|
||||
if not have_estimate_fail:
|
||||
msg(self.fee_fail_fs.format(c=opt.tx_confs,t=fe_type))
|
||||
msg(self.fee_fail_fs.format(c=opt.fee_estimate_confs,t=fe_type))
|
||||
have_estimate_fail.append(True)
|
||||
start_fee = None
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue