-
Notifications
You must be signed in to change notification settings - Fork 28
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
Decrease max_future_block_time_offset
#1788
Conversation
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.
Round
let last_header = headers.last().expect("Headers shouldn't be empty"); | ||
self.wait_for_clock_diff(last_header.timestamp()).await; |
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.
Why removing this? Please be careful with such radical changes without studying the consequences.
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.
I moved it to the line 644 where the block height is available
p2p/src/sync/peer/block_manager.rs
Outdated
let last_header = headers.last().expect("Headers shouldn't be empty"); | ||
self.wait_for_clock_diff( | ||
last_header.timestamp(), | ||
first_header_prev_block_index.block_height(), |
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.
Shouldn't it be the height of the last header? (which is the height of the first header plus the number of headers minus one).
P.S. perhaps we should call max_future_block_time_offset
for all heights in this range and choose the bigger.
d98ab17
to
49e55f3
Compare
No description provided.