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

Count state blocks in rai::block_processor::full () #1448

Merged
merged 2 commits into from Dec 14, 2018

Conversation

Projects
None yet
3 participants
@SergiySW
Copy link
Collaborator

commented Dec 13, 2018

No description provided.

@SergiySW SergiySW self-assigned this Dec 13, 2018

@rkeene rkeene added the bug label Dec 13, 2018

@rkeene rkeene added this to the V17.0 milestone Dec 13, 2018

@@ -1285,9 +1285,9 @@ void rai::block_processor::process_receive_many (std::unique_lock<std::mutex> &
// Processing blocks
while ((!blocks.empty () || !forced.empty ()) && std::chrono::steady_clock::now () - start_time < node.config.block_processor_batch_max_time)
{
if (blocks.size () > 64 && should_log ())
if ((blocks.size () + state_blocks.size ()) > 64 && should_log ())

This comment has been minimized.

Copy link
@rkeene

rkeene Dec 13, 2018

Contributor

Is this part correct ? In this loop we're only dequeuing blocks (items from state_blocks were enqueued to blocks after being verified at the start of process_receive_many() with a call to verify_state_blocks())

This comment has been minimized.

Copy link
@SergiySW

SergiySW Dec 13, 2018

Author Collaborator

Yes, but I guess we want to see all blocks remaining to process (?)

{
BOOST_LOG (node.log) << boost::str (boost::format ("%1% blocks in processing queue") % blocks.size ());
BOOST_LOG (node.log) << boost::str (boost::format ("%1% blocks in processing queue") % (blocks.size () + state_blocks.size ()));

This comment has been minimized.

Copy link
@rkeene

rkeene Dec 13, 2018

Contributor

Maybe for now, until we do merge in #1450:

Suggested change
BOOST_LOG (node.log) << boost::str (boost::format ("%1% blocks in processing queue") % (blocks.size () + state_blocks.size ()));
BOOST_LOG (node.log) << boost::str (boost::format ("%1% (+ %2%) blocks in processing queue") % blocks.size () % state_blocks.size ());
@rkeene

rkeene approved these changes Dec 14, 2018

Copy link
Contributor

left a comment

We'll adjust the logging later as a part of #1450 -- looks good to me !

@rkeene rkeene merged commit f9f2e32 into nanocurrency:releases/v17 Dec 14, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
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.