[qa] Add optional unique coinbase generation #7914

pull venatici wants to merge 1 commits into bitcoin:master from venatici:coinbase changing 1 files +11 −3
  1. venatici commented at 10:38 AM on April 20, 2016: none

    Optionally generate unique coinbase with the same height and pubkey.

    Alternative to #7886 maintaining backwards compat.

  2. [qa] Add optional unique coinbase generation 67943f9eea
  3. laanwj added the label Tests on Apr 20, 2016
  4. in qa/rpc-tests/test_framework/blocktools.py:None in 67943f9eea
      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):
    


    dhimmel commented at 3:45 PM on May 17, 2016:

    Would this line be better as either:

    if unique:
    

    or

    if unique is True:
    

    jtimon commented at 1:42 PM on May 20, 2016:
    if unique:
    

    Is the simplest form.

  5. jtimon commented at 1:45 PM on May 20, 2016: contributor

    Concept ACK

  6. laanwj commented at 8:56 AM on June 20, 2016: member

    Nothing uses the new functionality of create_coinbase?

  7. mrbandrews commented at 5:52 PM on June 22, 2016: contributor

    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.

  8. laanwj closed this on Aug 3, 2016

  9. laanwj commented at 10:24 AM on August 3, 2016: member

    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.

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me