mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 14:00:29 +01:00
test: Wallet imports on pruned nodes
Co-authored-by: Ryan Ofsky <ryan@ofsky.org> Co-authored-by: Andreas Kouloumos <kouloumosa@gmail.com>
This commit is contained in:
@@ -120,7 +120,7 @@ def script_BIP34_coinbase_height(height):
|
||||
return CScript([CScriptNum(height)])
|
||||
|
||||
|
||||
def create_coinbase(height, pubkey=None, extra_output_script=None, fees=0, nValue=50):
|
||||
def create_coinbase(height, pubkey=None, *, script_pubkey=None, extra_output_script=None, fees=0, nValue=50):
|
||||
"""Create a coinbase transaction.
|
||||
|
||||
If pubkey is passed in, the coinbase output will be a P2PK output;
|
||||
@@ -138,6 +138,8 @@ def create_coinbase(height, pubkey=None, extra_output_script=None, fees=0, nValu
|
||||
coinbaseoutput.nValue += fees
|
||||
if pubkey is not None:
|
||||
coinbaseoutput.scriptPubKey = key_to_p2pk_script(pubkey)
|
||||
elif script_pubkey is not None:
|
||||
coinbaseoutput.scriptPubKey = script_pubkey
|
||||
else:
|
||||
coinbaseoutput.scriptPubKey = CScript([OP_TRUE])
|
||||
coinbase.vout = [coinbaseoutput]
|
||||
|
||||
Reference in New Issue
Block a user