CreateNewBlock will generate invalid blocks #1578

issue TheBlueMatt opened this issue on July 11, 2012
  1. TheBlueMatt commented at 1:18 AM on July 11, 2012: member

    ...if you give it a coinbase with "sigops" in the scriptSig, especially the multisig sigops. Those are counted in CTransaction::GetLegacySigOpCount() (which is called for coinbase txes in block connection) and are not counted in CreateNewBlock

  2. luke-jr commented at 1:23 AM on July 11, 2012: member

    CScript::GetSigOpCount doesn't count opcodes inside serialization, and bitcoind always serializes data in scriptSig, so this should be a non-issue in practice.

  3. TheBlueMatt commented at 1:33 AM on July 11, 2012: member

    Ah, yes, you are right, stock bitcoind will not generate invalid blocks. Still...its an interesting issue for any miners that don't serialize.

  4. TheBlueMatt closed this on Jul 11, 2012

  5. suprnurd referenced this in commit 23582aea45 on Dec 5, 2017
  6. lateminer referenced this in commit c064baaf6e on May 6, 2020
  7. MarcoFalke locked this on Sep 8, 2021
Contributors

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-24 15:16 UTC

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