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

Improve uses of boost multi_index_container #2430

Conversation

guilhermelawless
Copy link
Contributor

@guilhermelawless guilhermelawless commented Dec 6, 2019

  • Switched to using a sequence index for dropped_elections_cache, confirmed_set, rolled_back, and block_arrival. This allows using push_back + pop_front with no sorting, and removing the timepoint in some cases where it was only used for ordering.
  • Replaced some insert with emplace.
  • Removed the <boost/multi_index/random_access_index.hpp> header where not necessary.
  • Added index tags everywhere. Some places had issues with not using the correct index.
  • Formatting, and enclosing declarations in clang-format off to be more readable. Was originally done in rep_crawler.

Change from ordered_non_unique to sequence where applicable, and general improvements.
@guilhermelawless guilhermelawless added the quality improvements This item indicates the need for or supplies changes that improve maintainability label Dec 6, 2019
@guilhermelawless guilhermelawless added this to the V21.0 milestone Dec 6, 2019
@guilhermelawless guilhermelawless self-assigned this Dec 6, 2019
@guilhermelawless guilhermelawless merged commit 55f4bcb into nanocurrency:develop Dec 11, 2019
@guilhermelawless guilhermelawless deleted the boost-multi-index-improvements branch December 11, 2019 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants