本文整理匯總了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