Fix nonsensical no-target handling
This commit is contained in:
parent
4d04840e3d
commit
bfed5843b4
@ -50,6 +50,7 @@ class ArgFlag(BaseArgFlag):
|
|||||||
self.add('env')
|
self.add('env')
|
||||||
self.add('provider')
|
self.add('provider')
|
||||||
self.add('chain_spec')
|
self.add('chain_spec')
|
||||||
|
self.add('target')
|
||||||
self.add('unsafe')
|
self.add('unsafe')
|
||||||
self.add('seq')
|
self.add('seq')
|
||||||
self.add('key_file')
|
self.add('key_file')
|
||||||
@ -68,10 +69,10 @@ class ArgFlag(BaseArgFlag):
|
|||||||
self.add('veryverbose')
|
self.add('veryverbose')
|
||||||
|
|
||||||
self.alias('sign', 'key_file', 'send')
|
self.alias('sign', 'key_file', 'send')
|
||||||
self.alias('std_base', 'verbose', 'config', 'raw', 'env', 'no_target')
|
self.alias('std_base', 'verbose', 'config', 'raw', 'env', 'target')
|
||||||
self.alias('std_base_read', 'verbose', 'config', 'raw', 'env', 'provider', 'chain_spec', 'seq')
|
self.alias('std_base_read', 'verbose', 'config', 'raw', 'env', 'provider', 'chain_spec', 'seq')
|
||||||
self.alias('std_read', 'std_base', 'provider', 'chain_spec', 'unsafe', 'seq', 'key_file', 'fee', 'no_target')
|
self.alias('std_read', 'std_base', 'provider', 'chain_spec', 'unsafe', 'seq', 'key_file', 'fee', 'target')
|
||||||
self.alias('std_write', 'verbose', 'config', 'raw', 'env', 'provider', 'chain_spec', 'unsafe', 'seq', 'key_file', 'sign', 'no_target', 'wait', 'wait_all', 'send', 'rpc_auth', 'nonce', 'fee')
|
self.alias('std_write', 'verbose', 'config', 'raw', 'env', 'provider', 'chain_spec', 'unsafe', 'seq', 'key_file', 'sign', 'target', 'wait', 'wait_all', 'send', 'rpc_auth', 'nonce', 'fee')
|
||||||
self.alias('std_target', 'no_target', 'exec', 'wallet')
|
self.alias('std_target', 'no_target', 'exec', 'wallet')
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +95,9 @@ class Arg(BaseArg):
|
|||||||
self.add('a', 'wallet', dest='recipient', help='Recipient address')
|
self.add('a', 'wallet', dest='recipient', help='Recipient address')
|
||||||
self.set_long('a', 'recipient')
|
self.set_long('a', 'recipient')
|
||||||
|
|
||||||
|
self.add('e', 'exec', dest='executable_address', help='Recipient address')
|
||||||
|
self.set_long('e', 'executable')
|
||||||
|
|
||||||
self.add('w', 'wait', typ=bool, help='Wait for the last transaction to be confirmed')
|
self.add('w', 'wait', typ=bool, help='Wait for the last transaction to be confirmed')
|
||||||
self.add('ww', 'wait', check=False, typ=bool, help='Wait for every transaction to be confirmed')
|
self.add('ww', 'wait', check=False, typ=bool, help='Wait for every transaction to be confirmed')
|
||||||
|
|
||||||
@ -105,7 +109,8 @@ class Arg(BaseArg):
|
|||||||
self.add_long('rpc-timeout', 'provider', help='RPC autentication credential values')
|
self.add_long('rpc-timeout', 'provider', help='RPC autentication credential values')
|
||||||
self.add_long('rpc-proxy', 'provider', help='RPC autentication credential values')
|
self.add_long('rpc-proxy', 'provider', help='RPC autentication credential values')
|
||||||
|
|
||||||
self.add_long('height', 'no_target', default='latest', help='Block height to execute against')
|
#self.add_long('height', 'no_target', default='latest', help='Block height to execute against')
|
||||||
|
self.add_long('height', 'target', default='latest', help='Block height to execute against')
|
||||||
|
|
||||||
self.add_long('rpc-auth', 'rpc_auth', help='RPC autentication scheme')
|
self.add_long('rpc-auth', 'rpc_auth', help='RPC autentication scheme')
|
||||||
self.add_long('rpc-credentials', 'rpc_auth', help='RPC autentication credential values')
|
self.add_long('rpc-credentials', 'rpc_auth', help='RPC autentication credential values')
|
||||||
|
@ -88,7 +88,7 @@ def process_config(config, arg, args, flags):
|
|||||||
config.dict_override(args_override, 'cli args', allow_empty=True)
|
config.dict_override(args_override, 'cli args', allow_empty=True)
|
||||||
|
|
||||||
if arg.match('provider', flags):
|
if arg.match('provider', flags):
|
||||||
if arg.match('no_target', flags, negate=True):
|
if arg.match('target', flags):
|
||||||
config.add(getattr(args, 'height'), '_HEIGHT')
|
config.add(getattr(args, 'height'), '_HEIGHT')
|
||||||
|
|
||||||
if arg.match('unsafe', flags):
|
if arg.match('unsafe', flags):
|
||||||
@ -101,7 +101,7 @@ def process_config(config, arg, args, flags):
|
|||||||
config.add(getattr(args, 'fee_price'), '_FEE_PRICE')
|
config.add(getattr(args, 'fee_price'), '_FEE_PRICE')
|
||||||
fee_limit = getattr(args, 'fee_limit')
|
fee_limit = getattr(args, 'fee_limit')
|
||||||
if fee_limit == None:
|
if fee_limit == None:
|
||||||
fee_limit = config.get('CHAIN_MIN_FEE')
|
fee_limit = int(config.get('CHAIN_MIN_FEE'))
|
||||||
config.add(fee_limit, '_FEE_LIMIT')
|
config.add(fee_limit, '_FEE_LIMIT')
|
||||||
|
|
||||||
if arg.match('nonce', flags):
|
if arg.match('nonce', flags):
|
||||||
|
Loading…
Reference in New Issue
Block a user