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

Fix some issues in block producer #154

Merged
merged 6 commits into from
Dec 24, 2018
Merged

Fix some issues in block producer #154

merged 6 commits into from
Dec 24, 2018

Conversation

leventeliu
Copy link
Contributor

@leventeliu leventeliu commented Dec 24, 2018

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.

@codecov
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

Merging #154 into develop will increase coverage by 0.04%.
The diff coverage is 96.25%.

@@             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
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

Merging #154 into develop will increase coverage by 0.17%.
The diff coverage is 82.75%.

@@             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

Copy link
Contributor

@zeqing-guo zeqing-guo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@auxten auxten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@zeqing-guo zeqing-guo merged commit 857da2c into develop Dec 24, 2018
@leventeliu leventeliu deleted the bugfix/bp branch December 24, 2018 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants