test: Fix a mistake in specifying the initial value at transaction_tests #21952

pull azuchi wants to merge 1 commits into bitcoin:master from azuchi:fix-initial-value changing 1 files +1 −1
  1. azuchi commented at 7:35 AM on May 15, 2021: none

    This PR fix the initial value of the ScriptError when validating the transaction script. Currently, the initial value specification is reversed.

  2. Fix a mistake in specifying the initial value at transaction_tests 22b16f4655
  3. MarcoFalke commented at 7:53 AM on May 15, 2021: member

    The code is correct. The goal is to set it to the inverse value that is expected to be returned. The pattern is:

    bool expected_ret{false}
    DoSomething(&expected_ret);
    Assert(expected_ret);
    

    If it was initialized to true, it might accidentally pass when the code is wrong and forgets to set it.

  4. MarcoFalke closed this on May 15, 2021

  5. azuchi deleted the branch on May 15, 2021
  6. DrahtBot locked this on Aug 16, 2022
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-22 18:14 UTC

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