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

Make sure that Parachain heads are updated #945

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Mar 26, 2020

Updating the heads was accidentally removed in some other pr.

Updating the heads was accidentally removed in some other pr.
@bkchr bkchr added the A0-please_review Pull request needs code review. label Mar 26, 2020
@bkchr bkchr requested a review from rphmeier March 26, 2020 22:26
@@ -640,6 +640,7 @@ impl<T: Trait> Module<T> {

for head in heads.iter() {
let id = head.parachain_index();
Heads::insert(id, &head.candidate.head_data.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

A somewhat random place to insert this. Should probably be in the check_candidates loop instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just added it back to the position where it was before being removed 🤷‍♀️

d9b4fc4#diff-e21f8096708b22fcdbd66ebc74f0821aL457

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like Heads should be modified only in case check_candidates succeeded; if that insert was moved in check_candidates loop over all candidates we may end up with a partially modified Heads ? Or add another loop in the end of check_candidates right before returning Ok.

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

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

I don't have an opinion on @rphmeier's comment, but otherwise looks good.

@gavofyork gavofyork merged commit d6c5acc into master Apr 1, 2020
@gavofyork gavofyork deleted the bkchr-parachain-update-heads branch April 1, 2020 15:01
HCastano added a commit that referenced this pull request May 4, 2021
b2099c5c Bump Substrate to `b094edaf` (#958)
3f037094 Bump endowment amounts on Rialto and Millau (#957)
b21fd07c Bump Substrate WASM builder (#947)
30ccd07c Bump Substrate to `ec180313` (#955)
a7422ab1 Upgrade to GitHub-native Dependabot (#945)
ed20ef34 Move pallet-bridge-dispatch types to primitives (#948)
2070c4d6 Endow accounts and add `bridgeIds` to chainspec. (#951)
f43c9243 Fix account derivation in CLI (#952)
9ac07e73 Add backbone configuration of cargo-spellcheck (#924)
2761c3fe Message dispatch support multiple instances (#942)
801c99f3 Add Wococo<>Rococo Header Relayer (#925)
21f49051 Remove Westend<>Rococo header sync (#940)
06235f16 do not panic if pallet is not yet initialized (#937)
a13ee0bc Bump Substrate (#939)
f8680cbf jsonrpsee alpha6 (#938)
6163bcbf reonnect to failed client in on-demand relay background task (#936)
14e82bea Do not spawn additional task for on-demand relays (#933)
b1557b88 Relay at least one header for every source chain session (#923)
9420649c Remove deprecated Runtime Header APIs (#932)
9627011e Update README.md (#931)
7b736b9c Truncate output in logs. (#930)
faad06e3 Make sure that relayers have dates in logs. (#927)
07734535 Update dump-logs script. (#928)
c2d56b2e Add pruning to bechmarks & update weights. (#918)
a30c51dc Add properties to Chain Spec (#917)
d691c73e Fix issue with on-demand headers relay not starting (#921)
8ee55c1e Fix image publishing. (#922)
f51fb59d Prefix in relay loops logs (#920)

git-subtree-dir: bridges
git-subtree-split: b2099c5c0baf569e2ec7228507b6e4f3972143cc
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.

6 participants