-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
RPC receive #142
Merged
Merged
RPC receive #142
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dsiganos
added a commit
that referenced
this pull request
Jun 13, 2022
- Limit the vote_processor::flush_active() - The is_active var became useless, also moved the lock position - Move the condition.notify_all() up - Improve function flush documentation - Test normal behavior is getting more votes than processing - Also updated the invalid_signature test to ASSERT_TIMELY since it should wait for a flush to happen. - Also removed the lock for reading total_processed atomic variable - Explicitly check for timeout in unit test vote_processor.overflow - Vote processor: clear votes and notify condition variable on thread exit In theory the vote processor can be stopped and have votes left in its queue which would just be strange and a potential source of problems. Also, a final kick of the condition variable is needed on thread exit and after vote clearing. - Check for confirm req loop blocking too long on vote process flush This has been a problem in the past and it is always tricky to do flush operations, so it is prudent to add a check for timeout here and display a warning in release and throw an assert in debug builds. - Use std::memory_order_relaxed in vote processor::flush for total_processed There is no need to take a memory barrier when reading the atomic total_processed, so use relaxed memory order. Co-Authored-By: Dimitrios Siganos <dimitris@siganos.org> Co-authored-by: Dimitrios Siganos <dimitris@siganos.org>
pwojcikdev
pushed a commit
to pwojcikdev/nano-node
that referenced
this pull request
Jun 14, 2022
…y#142) - Limit the vote_processor::flush_active() - The is_active var became useless, also moved the lock position - Move the condition.notify_all() up - Improve function flush documentation - Test normal behavior is getting more votes than processing - Also updated the invalid_signature test to ASSERT_TIMELY since it should wait for a flush to happen. - Also removed the lock for reading total_processed atomic variable - Explicitly check for timeout in unit test vote_processor.overflow - Vote processor: clear votes and notify condition variable on thread exit In theory the vote processor can be stopped and have votes left in its queue which would just be strange and a potential source of problems. Also, a final kick of the condition variable is needed on thread exit and after vote clearing. - Check for confirm req loop blocking too long on vote process flush This has been a problem in the past and it is always tricky to do flush operations, so it is prudent to add a check for timeout here and display a warning in release and throw an assert in debug builds. - Use std::memory_order_relaxed in vote processor::flush for total_processed There is no need to take a memory barrier when reading the atomic total_processed, so use relaxed memory order. Co-Authored-By: Dimitrios Siganos <dimitris@siganos.org> Co-authored-by: Dimitrios Siganos <dimitris@siganos.org> # Conflicts: # nano/core_test/vote_processor.cpp
gr0vity-dev
pushed a commit
to gr0vity-dev/nano-node
that referenced
this pull request
Jul 9, 2022
…y#142) - Limit the vote_processor::flush_active() - The is_active var became useless, also moved the lock position - Move the condition.notify_all() up - Improve function flush documentation - Test normal behavior is getting more votes than processing - Also updated the invalid_signature test to ASSERT_TIMELY since it should wait for a flush to happen. - Also removed the lock for reading total_processed atomic variable - Explicitly check for timeout in unit test vote_processor.overflow - Vote processor: clear votes and notify condition variable on thread exit In theory the vote processor can be stopped and have votes left in its queue which would just be strange and a potential source of problems. Also, a final kick of the condition variable is needed on thread exit and after vote clearing. - Check for confirm req loop blocking too long on vote process flush This has been a problem in the past and it is always tricky to do flush operations, so it is prudent to add a check for timeout here and display a warning in release and throw an assert in debug builds. - Use std::memory_order_relaxed in vote processor::flush for total_processed There is no need to take a memory barrier when reading the atomic total_processed, so use relaxed memory order. Co-Authored-By: Dimitrios Siganos <dimitris@siganos.org> Co-authored-by: Dimitrios Siganos <dimitris@siganos.org> # Conflicts: # nano/core_test/vote_processor.cpp
gr0vity-dev
pushed a commit
to gr0vity-dev/nano-node
that referenced
this pull request
Oct 23, 2024
Rpc refactoring
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Will be useful if someone send less than threshold, but cumulative > threshold. Such as 99 + 99 > 100 and cannot be received by current exchanges