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

Filter out minor block headers with larger create time #780

Merged
merged 5 commits into from
Oct 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions quarkchain/cluster/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,9 @@ async def add_root_block(self, r_block: RootBlock):
adjusted_diff = await self.__adjust_diff(r_block)
try:
update_tip = self.root_state.add_block(r_block, adjusted_diff=adjusted_diff)
for m_block_header in r_block.minor_block_header_list:
if m_block_header.create_time > r_block.header.create_time:
update_tip = False
except ValueError as e:
Logger.log_exception()
raise e
Expand Down