mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
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
This commit is contained in:
commit
1fc783fc08
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user