Don't overwrite validation state with corruption check #9511

pull morcos wants to merge 1 commits into bitcoin:master from morcos:ATMPstate changing 1 files +4 −3
  1. morcos commented at 10:00 PM on January 10, 2017: member

    AcceptToMemoryPool has several classes of return false statements.

    • return state.Invalid or state.DoS directly itself
    • return false and set fMissingInputs (state is valid)
    • return false and state is set by failed CheckTransaction
    • return false and state is set by failed CheckInputs.

    This commit patches the last case where the state variable was reused for additional calls to CheckInputs to identify witness stripping as cause of validation failure. After this commit, it should be the case that if !fMissingInputs, state is always Invalid if AcceptToMemoryPool returns false.

  2. Don't overwrite validation state with corruption check
    AcceptToMemoryPool has several classes of return false statements.
    - return state.Invalid or state.DoS directly itself
    - return false and set fMissingInputs (state is valid)
    - return false and state is set by failed CheckTransaction
    - return false and state is set by failed CheckInputs.
    
    This commit patches the last case where the state variable was reused for additional calls to CheckInputs to identify witness stripping as cause of validation failure.  After this commit, it should be the case that if !fMissingInputs, state is always Invalid if AcceptToMemoryPool returns false.
    116419e58d
  3. fanquake added the label Validation on Jan 11, 2017
  4. sipa commented at 11:43 PM on January 11, 2017: member

    utACK 116419e58dddef8fe3ff9806a1d8ceebe64ae3e6

  5. MarcoFalke commented at 1:04 AM on January 12, 2017: member

    utACK 116419e

  6. luke-jr commented at 9:41 PM on January 20, 2017: member

    utACK

  7. sipa added the label Bug on Jan 21, 2017
  8. sipa added this to the milestone 0.14.0 on Jan 21, 2017
  9. laanwj commented at 12:18 PM on January 23, 2017: member

    utACK 116419e

  10. laanwj merged this on Jan 23, 2017
  11. laanwj closed this on Jan 23, 2017

  12. laanwj referenced this in commit 7884956414 on Jan 23, 2017
  13. MarcoFalke locked this on Sep 8, 2021

Milestone
0.14.0


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-22 12:15 UTC

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