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

Early detection for votes overflow #1406

Merged
merged 7 commits into from Nov 23, 2018

Conversation

Projects
4 participants
@SergiySW
Copy link
Collaborator

commented Nov 22, 2018

Fixes #1391

@rkeene rkeene requested review from cryptocode and PlasmaPower Nov 23, 2018

@rkeene rkeene added the enhancement label Nov 23, 2018

@rkeene rkeene added this to the V18.0 milestone Nov 23, 2018

@PlasmaPower
Copy link
Contributor

left a comment

Other than that, LGTM

@@ -863,7 +863,30 @@ void rai::vote_processor::vote (std::shared_ptr<rai::vote> vote_a, rai::endpoint
std::lock_guard<std::mutex> lock (mutex);
if (!stopped)
{
if (votes.size () < 256 * 1024)
bool process (rai::rai_network == rai::rai_networks::rai_test_network);

This comment has been minimized.

Copy link
@PlasmaPower

PlasmaPower Nov 23, 2018

Contributor

This initial value doesn't do anything as it'll be overridden later. I'd put this condition as the first if statement, and keep the rest as "else if"s.

This comment has been minimized.

Copy link
@PlasmaPower

PlasmaPower Nov 23, 2018

Contributor

I guess it does help if the rep is >= 5%. Was that intended?

This comment has been minimized.

Copy link
@SergiySW

SergiySW Nov 23, 2018

Author Collaborator

Test network value required only for votes processor profiling, good catch

Show resolved Hide resolved rai/node/node.cpp Outdated

SergiySW added some commits Nov 23, 2018

@rkeene rkeene merged commit 7298a3a into nanocurrency:master Nov 23, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zhyatt zhyatt added this to Unscheduled in V18 Dec 27, 2018

@SergiySW SergiySW moved this from Unscheduled to CP 0 in V18 Dec 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.