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 minor cleanup #2291

Merged
merged 1 commit into from
Sep 8, 2019
Merged

Some minor cleanup #2291

merged 1 commit into from
Sep 8, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Sep 8, 2019

Removed representation_add () in ledger.cpp. It has an unused nano::transaction parameter and calling the contents of the function (1 line) directly where it's used seems cleaner than the extra indirection of this function.

Removed multi-line commented section of code in core_test/epochs.cpp. It references an epoch_2 which doesn't currently exist, so will just confuse anyone looking at it.

nano/secure/CMakeLists.txt to be consistent with the rest of the file the header goes before the source file.

The confirmation height processor now has a dependency on the ledger class and the constructor is passed a cemented_count cache from the ledger, this can just be called from the ledger object directly now, no need to pass it in.

Some functions in ledger/epoch can return const & to avoid a copy.

Using auto to simplify some lambda parameters in epoch.cpp and pass the link capture by reference

@wezrule wezrule added quality improvements This item indicates the need for or supplies changes that improve maintainability non-functional change labels Sep 8, 2019
@wezrule wezrule added this to the V20.0 milestone Sep 8, 2019
@wezrule wezrule self-assigned this Sep 8, 2019
@wezrule wezrule merged commit 1f2f1c7 into nanocurrency:master Sep 8, 2019
@wezrule wezrule deleted the some_cleanup branch September 8, 2019 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-functional change quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants