mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-26 00:41:23 +02:00
remove unused functions
the functions `create_transaction()` and `create_raw_transaction()` were no longer used hence removed.
This commit is contained in:
parent
eec23dad1e
commit
50ba6697f3
@ -162,30 +162,6 @@ def create_tx_with_script(prevtx, n, script_sig=b"", *, amount, script_pub_key=C
|
|||||||
tx.calc_sha256()
|
tx.calc_sha256()
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
def create_transaction(node, txid, to_address, *, amount):
|
|
||||||
""" Return signed transaction spending the first output of the
|
|
||||||
input txid. Note that the node must have a wallet that can
|
|
||||||
sign for the output that is being spent.
|
|
||||||
"""
|
|
||||||
raw_tx = create_raw_transaction(node, txid, to_address, amount=amount)
|
|
||||||
tx = tx_from_hex(raw_tx)
|
|
||||||
return tx
|
|
||||||
|
|
||||||
def create_raw_transaction(node, txid, to_address, *, amount):
|
|
||||||
""" Return raw signed transaction spending the first output of the
|
|
||||||
input txid. Note that the node must have a wallet that can sign
|
|
||||||
for the output that is being spent.
|
|
||||||
"""
|
|
||||||
psbt = node.createpsbt(inputs=[{"txid": txid, "vout": 0}], outputs={to_address: amount})
|
|
||||||
for _ in range(2):
|
|
||||||
for w in node.listwallets():
|
|
||||||
wrpc = node.get_wallet_rpc(w)
|
|
||||||
signed_psbt = wrpc.walletprocesspsbt(psbt)
|
|
||||||
psbt = signed_psbt['psbt']
|
|
||||||
final_psbt = node.finalizepsbt(psbt)
|
|
||||||
assert_equal(final_psbt["complete"], True)
|
|
||||||
return final_psbt['hex']
|
|
||||||
|
|
||||||
def get_legacy_sigopcount_block(block, accurate=True):
|
def get_legacy_sigopcount_block(block, accurate=True):
|
||||||
count = 0
|
count = 0
|
||||||
for tx in block.vtx:
|
for tx in block.vtx:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user