-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix some issues in block producer #154
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #154 +/- ##
===========================================
+ Coverage 76.74% 76.78% +0.04%
===========================================
Files 146 146
Lines 10890 10909 +19
===========================================
+ Hits 8357 8377 +20
+ Misses 1845 1843 -2
- Partials 688 689 +1 |
Codecov Report
@@ Coverage Diff @@
## develop #154 +/- ##
===========================================
+ Coverage 76.59% 76.77% +0.17%
===========================================
Files 146 146
Lines 10893 10903 +10
===========================================
+ Hits 8344 8371 +27
+ Misses 1858 1842 -16
+ Partials 691 690 -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Tx flooding
The AddTx broadcasting needs a TTL control, or simply check local existence first.
DATARACE
Calling WaitGroup.Add in RPC handling goroutine main cause DATARACE: calls with a positive delta that occur when the counter is zero must happen before a Wait.
Use new WaitGroup instance while creating new sub-goroutines in a worker goroutine instead.
This also changes the broadcasting mode from nonblocking to blocking the worker goroutine -- but will be fine with the timeout context, if they work properly.
Nil field
Also check nil signee or signature in default verifier implementation.