Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Removed superfluous safety check #3530

Merged
merged 1 commit into from
Sep 2, 2019
Merged

Removed superfluous safety check #3530

merged 1 commit into from
Sep 2, 2019

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Sep 2, 2019

This check is a major performance hit because a tree route to the last finalized block may potentially contain thousands of blocks (as it does on kusama)
It is also unnecessary since the same condition is properly checked here:

for r in tree_route.retracted() {
if r.hash == meta.finalized_hash {
warn!(
"Potential safety failure: reverting finalized block {:?}",
(&r.number, &r.hash)
);
return Err(::client::error::Error::NotInFinalizedChain.into());

@arkpar arkpar added A0-please_review Pull request needs code review. B0-patchthis labels Sep 2, 2019
@bkchr bkchr merged commit d2e7d66 into master Sep 2, 2019
@bkchr bkchr deleted the a-fix-peformance branch September 2, 2019 14:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants