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:
4 files changed
+167
-18
No files matched your search
@@ -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