Remove unused variable COINBASE_FLAGS #17489

pull Xekyo wants to merge 1 commits into bitcoin:master from Xekyo:removeUnusedVariable changing 1 files +0 −3
  1. Xekyo commented at 4:51 PM on November 15, 2019: member

    No description provided.

  2. Remove unused COINBASE_FLAGS 878af3e144
  3. MarcoFalke added the label Refactoring on Nov 15, 2019
  4. MarcoFalke commented at 4:58 PM on November 15, 2019: member

    Oh, looks like it is still used in miner.cpp:

    $ git grep COINBASE_FLA
    src/miner.cpp:    txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
    src/rpc/mining.cpp:    aux.pushKV("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()));
    src/validation.h:extern CScript COINBASE_FLAGS;
    
  5. MarcoFalke commented at 5:00 PM on November 15, 2019: member

    So it might be better to move it to miner.h,cpp. It is confusing to have this sit in validation.h,cpp, where it appears to be an unused variable.

  6. fanquake added the label Waiting for author on Nov 15, 2019
  7. Xekyo commented at 9:43 PM on November 15, 2019: member

    Ah, my bad. Closing then, as I guess this falls into the refactors section rather than a simple deletion.

  8. Xekyo closed this on Nov 15, 2019

  9. MarcoFalke added the label Up for grabs on Nov 15, 2019
  10. laanwj commented at 11:21 AM on November 19, 2019: member

    But what is the point of it, if it's never assigned a value?

    Looks like the last assignment was removed in d449772cf69c01932fc5d72c46054815d6300b3c.

    I suppose it's kept around for future signalling purposes, but yes, moving it to mining at least would make sense.

  11. jnewbery commented at 11:55 AM on November 19, 2019: member

    Concept ACK on removal. COINBASE_FLAGS has not been used since BIP 16/17 signalling.

    I think @narula is planning to pick this one up.

  12. fanquake removed the label Up for grabs on Nov 19, 2019
  13. fanquake removed the label Waiting for author on Nov 19, 2019
  14. laanwj referenced this in commit a739d207a3 on Nov 22, 2019
  15. sidhujag referenced this in commit c9cd991cc2 on Nov 22, 2019
  16. sidhujag referenced this in commit c3b9f4d646 on Nov 10, 2020
  17. vijaydasmp referenced this in commit 29a3f26fa5 on Aug 30, 2021
  18. PastaPastaPasta referenced this in commit c417db87c9 on Aug 31, 2021
  19. DrahtBot locked this on Dec 16, 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-04-13 15:14 UTC

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