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

dbft: adjust timer setting by the block processing time #46

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

roman-khimov
Copy link
Member

Make block timing more accurate under load. BlockIndex is needed to
distinguish between consensus-produced block and the one added via regular
block addition mechanism.

See neo-project/neo#1959 and neo-project/neo#1960.

Make block timing more accurate under load. BlockIndex is needed to
distinguish between consensus-produced block and the one added via regular
block addition mechanism.

See neo-project/neo#1959 and neo-project/neo#1960.
@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #46 into master will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   71.29%   71.50%   +0.21%     
==========================================
  Files          24       24              
  Lines        1045     1053       +8     
==========================================
+ Hits          745      753       +8     
  Misses        246      246              
  Partials       54       54              
Impacted Files Coverage Δ
context.go 79.76% <ø> (ø)
check.go 80.00% <100.00%> (+0.83%) ⬆️
dbft.go 65.63% <100.00%> (+0.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c0e262...c641e01. Read the comment docs.

@@ -123,6 +123,14 @@ func (d *DBFT) InitializeConsensus(view byte) {
} else {
timeout = d.SecondsPerBlock << (d.ViewNumber + 1)
}
if d.lastBlockIndex+1 == d.BlockIndex {
var ts = d.Timer.Now()
Copy link
Contributor

Choose a reason for hiding this comment

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

var x = -> x := ?

Copy link
Member Author

Choose a reason for hiding this comment

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

¡No me gusta :=! Not that it's that big of a problem, though.

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.

2 participants