diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-07-16 22:47:21 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-07-16 22:47:33 +0200 |
commit | 1fc783fc08bc078239537535f174ab8a489772c0 (patch) | |
tree | bc3bd9109763af85b906c087846e4f82ea2a48b6 | |
parent | 565494619d809655fa94d274bb2202d25553e485 (diff) | |
parent | 5618b7d1ad3f2a258d46cf67b732ffddd3f34cb6 (diff) |
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
-rw-r--r-- | src/test/txvalidationcache_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp index a74f40251a..f609cb1af4 100644 --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -196,8 +196,8 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup) // Test that invalidity under a set of flags doesn't preclude validity // under other (eg consensus) flags. // spend_tx is invalid according to DERSIG - CValidationState state; { + CValidationState state; PrecomputedTransactionData ptd_spend_tx(spend_tx); BOOST_CHECK(!CheckInputs(spend_tx, state, pcoinsTip, true, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_DERSIG, true, true, ptd_spend_tx, nullptr)); |