Optionally generate unique coinbase with the same height and pubkey.
Alternative to #7886 maintaining backwards compat.
45 | coinbase = CTransaction() 46 | - coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff), 47 | - ser_string(serialize_script_num(height)), 0xffffffff)) 48 | + scriptSig = ser_string(serialize_script_num(height)) 49 | + 50 | + if (unique == True):
Would this line be better as either:
if unique:
or
if unique is True:
if unique:
Is the simplest form.
Concept ACK
Nothing uses the new functionality of create_coinbase?
I don't feel strongly about it, but I probably prefer the simplicity of 7886. I think the caller's usual expectation would be to get a unique coinbase, even for the same height and same pubkey (which would be reused for convenience, not because the test code is thinking of a single miner producing all the blocks). I verified the assertion in 7886 that it doesn't break any of the existing tests.
Closing this - There is no point in merging this as-is. if anyone needs this functionality for a test they are writing, they can cherry-pick this as well.