This PR fix the initial value of the ScriptError when validating the transaction script. Currently, the initial value specification is reversed.
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-
azuchi commented at 7:35 AM on May 15, 2021: none
-
Fix a mistake in specifying the initial value at transaction_tests 22b16f4655
-
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. - MarcoFalke closed this on May 15, 2021
- azuchi deleted the branch on May 15, 2021
- DrahtBot locked this on Aug 16, 2022
Contributors