Better error handling for submitblock #10146

pull gmaxwell wants to merge 3 commits into bitcoin:master from gmaxwell:better_error_submitblock changing 2 files +22 −11
  1. gmaxwell commented at 4:04 am on April 4, 2017: contributor

    Check transaction count early in submitblock.

    There is no point in even hashing a submitted block which doesn’t have a coinbase transaction.

    This also results in more useful error reporting on corrupted input.

    Thanks to rawodb for the bug report.

  2. Make GetWitnessCommitmentIndex callable on blocks without a coinbase txn.
    This isn't actually needed anywhere, but it's less brittle.
    ada0caa165
  3. Check transaction count early in submitblock.
    There is no point in even hashing a submitted block which doesn't have
     a coinbase transaction.
    
    This also results in more useful error reporting on corrupted input.
    
    Thanks to rawodb for the bug report.
    4f15ea102d
  4. Add braces to submitblock per current style. 30f30c0f99
  5. fanquake added the label Validation on Apr 4, 2017
  6. fanquake added the label RPC/REST/ZMQ on Apr 4, 2017
  7. laanwj added this to the milestone 0.14.1 on Apr 4, 2017
  8. laanwj added the label Needs backport on Apr 4, 2017
  9. jonasschnelli commented at 6:22 am on April 4, 2017: contributor
    utACK 30f30c0f99d21d6c8476c759104de5bb3218a188
  10. paveljanik commented at 6:28 am on April 4, 2017: contributor
    utACK 30f30c0
  11. laanwj commented at 6:58 am on April 4, 2017: member
    Reminder: this needs a functional test to prevent regression, but not necessary in this PR.
  12. laanwj merged this on Apr 4, 2017
  13. laanwj closed this on Apr 4, 2017

  14. laanwj referenced this in commit 72bc7e1303 on Apr 4, 2017
  15. laanwj referenced this in commit 2fea10ad03 on Apr 4, 2017
  16. laanwj referenced this in commit a44a6a15f9 on Apr 4, 2017
  17. laanwj removed the label Needs backport on Apr 5, 2017
  18. jnewbery commented at 8:55 pm on April 11, 2017: member
    Regression test here: #10190
  19. codablock referenced this in commit ec563a0f17 on Jan 26, 2018
  20. andvgal referenced this in commit 7e659c18e3 on Jan 6, 2019
  21. CryptoCentric referenced this in commit 44e5c21ee7 on Feb 27, 2019
  22. 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: 2024-11-21 12:12 UTC

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