本文整理汇总了Python中electrum.wallet.Multisig_Wallet.make_unsigned_transaction方法的典型用法代码示例。如果您正苦于以下问题:Python Multisig_Wallet.make_unsigned_transaction方法的具体用法?Python Multisig_Wallet.make_unsigned_transaction怎么用?Python Multisig_Wallet.make_unsigned_transaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类electrum.wallet.Multisig_Wallet
的用法示例。
在下文中一共展示了Multisig_Wallet.make_unsigned_transaction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_unsigned_transaction
# 需要导入模块: from electrum.wallet import Multisig_Wallet [as 别名]
# 或者: from electrum.wallet.Multisig_Wallet import make_unsigned_transaction [as 别名]
def make_unsigned_transaction(self, coins, outputs, config, fixed_fee=None,
change_addr=None, is_sweep=False):
mk_tx = lambda o: Multisig_Wallet.make_unsigned_transaction(
self, coins, o, config, fixed_fee, change_addr)
fee = self.extra_fee(config) if not is_sweep else 0
if fee:
address = self.billing_info['billing_address']
fee_output = TxOutput(TYPE_ADDRESS, address, fee)
try:
tx = mk_tx(outputs + [fee_output])
except NotEnoughFunds:
# TrustedCoin won't charge if the total inputs is
# lower than their fee
tx = mk_tx(outputs)
if tx.input_value() >= fee:
raise
self.print_error("not charging for this tx")
else:
tx = mk_tx(outputs)
return tx