test: Require named arg for create_block ntime arg

The named arg is useful, so that the two integral args (possibly
integral literals) `height` and `ntime` are not confused.
This commit is contained in:
MarcoFalke
2026-04-16 08:00:55 +02:00
parent fab352053d
commit fa16bc53d7
10 changed files with 21 additions and 24 deletions

View File

@@ -95,7 +95,7 @@ def nbits_str(nbits):
def target_str(target):
return f"{target:064x}"
def create_block(hashprev=None, coinbase=None, ntime=None, *, height=None, version=None, tmpl=None, txlist=None):
def create_block(hashprev=None, coinbase=None, *, ntime=None, height=None, version=None, tmpl=None, txlist=None):
"""Create a block (with regtest difficulty)."""
block = CBlock()
if tmpl is None: