本文整理汇总了Python中simple_config.SimpleConfig.fee_estimates方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleConfig.fee_estimates方法的具体用法?Python SimpleConfig.fee_estimates怎么用?Python SimpleConfig.fee_estimates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simple_config.SimpleConfig
的用法示例。
在下文中一共展示了SimpleConfig.fee_estimates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_cmdline
# 需要导入模块: from simple_config import SimpleConfig [as 别名]
# 或者: from simple_config.SimpleConfig import fee_estimates [as 别名]
def run_cmdline(self, config_options):
password = config_options.get('password')
new_password = config_options.get('new_password')
config = SimpleConfig(config_options)
config.fee_estimates = self.network.config.fee_estimates.copy()
cmdname = config.get('cmd')
cmd = known_commands[cmdname]
if cmd.requires_wallet:
path = config.get_wallet_path()
wallet = self.wallets.get(path)
if wallet is None:
return {'error': 'Wallet not open. Use "electrum daemon load_wallet"'}
else:
wallet = None
# arguments passed to function
args = map(lambda x: config.get(x), cmd.params)
# decode json arguments
args = map(json_decode, args)
# options
args += map(lambda x: config.get(x), cmd.options)
cmd_runner = Commands(config, wallet, self.network, password=password, new_password=new_password)
func = getattr(cmd_runner, cmd.name)
result = func(*args)
return result