[tests] Avoid redundant assignments. Remove unused variables. #10777

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

practicalswift commented Jul 8, 2017 edited

  • Remove unused variables.
  • Avoid redundant assignments.

fanquake added the Tests label Jul 8, 2017

src/test/sighash_tests.cpp
- nRandomTests = 500;
+ int nRandomTests = 500;
+ #else
+ int nRandomTests = 50000;
#endif
for (int i=0; i<nRandomTests; i++) {
@paveljanik

paveljanik Jul 9, 2017

Contributor

nRandomTests is undeclared in case of !defined(PRINT_SIGHASH_JSON). There are too many #if defined(PRINT_SIGHASH_JSON) anyway...

@practicalswift

practicalswift Jul 9, 2017

Contributor

@paveljanik Merged the two #if defined(PRINT_SIGHASH_JSON):s. Looks better?

@paveljanik

paveljanik Jul 9, 2017

Contributor

BTW - PRINT_SIGHASH_JSON is never defined in our tree.

@practicalswift

practicalswift Jul 9, 2017

Contributor

@paveljanik The ifdef was added in 232aa9e by @maraoz to control if data/sighash.json test data should be written. Is it no longer needed?

Contributor

TheBlueMatt commented Jul 10, 2017

utACK 49eb091

Contributor

paveljanik commented Jul 14, 2017

utACK 49eb091

But I still wonder who and where defines PRINT_SIGHASH_JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment