Skip to content

Commit 1fc783f

Browse files
author
MarcoFalke
committed
Merge #10739: test: Move variable state down where it is used
5618b7d Do not shadow upper local variable `state`. (Pavel Janík) Pull request description: Tests added in #10192 emit few shadowing warnings: ``` test/txvalidationcache_tests.cpp:268:26: warning: declaration shadows a local variable [-Wshadow] test/txvalidationcache_tests.cpp:296:26: warning: declaration shadows a local variable [-Wshadow] test/txvalidationcache_tests.cpp:357:26: warning: declaration shadows a local variable [-Wshadow] ``` Remove shadowing declarations and reuse the upper local declaration as in other already present test cases. Tree-SHA512: 1e3c52cf963f8f33e729900c8ecdcd5cc6fe28caa441ba53c4636df9cc3d1a351ca231966d36384589f1340ae8ddd447424c2ee3e8527d334d0412f0d1a10c8f
2 parents 5654946 + 5618b7d commit 1fc783f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/txvalidationcache_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup)
196196
// Test that invalidity under a set of flags doesn't preclude validity
197197
// under other (eg consensus) flags.
198198
// spend_tx is invalid according to DERSIG
199-
CValidationState state;
200199
{
200+
CValidationState state;
201201
PrecomputedTransactionData ptd_spend_tx(spend_tx);
202202

203203
BOOST_CHECK(!CheckInputs(spend_tx, state, pcoinsTip, true, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_DERSIG, true, true, ptd_spend_tx, nullptr));

0 commit comments

Comments
 (0)