Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some code cleanup #2449

Merged
merged 4 commits into from
Jan 3, 2020
Merged

Some code cleanup #2449

merged 4 commits into from
Jan 3, 2020

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Dec 20, 2019

seq_con_info is not fully accurate, because there are many containers that are used not just sequence (vector, list etc..), such as maps. Changed it to be container_info.

I started a trend of using namespace nano guards around the collect_seq_con_info functions. We don't do this anywhere else (and I think that should stay the case). So adding the nano namespace qualifier to these functions i.e nano::.... Also arranged the contents of those functions to be more consistent with each other and removed any = 0 count initialises because they are always set later so it's redundant.

config.hpp
No need for static, as const variables implicitly have static linakge already (of course you need the "pointer to constant data" form too: const char* const str)

core_test/rpc.cpp
The rpc.database_txn_tracker test was not being run when building with rocksdb regardless of the TEST_USE_ROCKSDB env variable, it should only be disabled if actually using it.

Some tests were missing ASSERT_NO_ERROR around system.poll () and some system.deadline_set () calls before them too.

core_test/locks.cpp
I had built with a ridiculously high NANO_TIMED_LOCKS value, without even realising, then noticed the locks tests appearing to stall. This is just because they do a sleep for the NANO_TIMED_LOCKS length inside the test, so I'm now failing the test if it is greater than 10 seconds just so that they can finish at least.

@wezrule wezrule added this to the V21.0 milestone Dec 20, 2019
@wezrule wezrule self-assigned this Dec 20, 2019
argakiig
argakiig previously approved these changes Dec 20, 2019
argakiig
argakiig previously approved these changes Dec 30, 2019
@wezrule wezrule dismissed stale reviews from guilhermelawless and argakiig via 8941353 January 3, 2020 19:12
@wezrule wezrule merged commit 91460e4 into nanocurrency:develop Jan 3, 2020
@wezrule wezrule deleted the some_code_cleanup branch January 3, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants