-
Notifications
You must be signed in to change notification settings - Fork 371
Keep unpinned blocks for a while before announcing #83
Conversation
Forked at: 461b971 Parent branch: origin/master
bkchr
left a comment
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.
Some small changes still need to be done, but overall looks good.
test/parachain/src/service.rs
Outdated
| key: Arc<CollatorPair>, | ||
| polkadot_config: polkadot_collator::Configuration, | ||
| ) -> sc_service::error::Result<impl AbstractService> { | ||
| parachain_config.announce_block = false; |
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.
This should be moved into some function provided by Cumulus. As people will need to replicate this all the time and we may need to "tweak" the config even more in the future.
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.
Should I create a crate service for this?
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.
Ok as discussed I placed it in the collator crate
test/parachain/src/service.rs
Outdated
|
|
||
| use futures::FutureExt; | ||
|
|
||
| use futures::prelude::*; |
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'm no huge fan of blindly including preludes. (But it is okay :P )
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.
🦥 will fix it :)
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.
done
| } | ||
| } | ||
|
|
||
| pub struct WaitToAnnounce<Block: BlockT> { |
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.
Some docs would be nice.
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.
Yes! I was waiting for you to validate the implementation first to be sure
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.
done
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
|
hmm 🤔 that's annoying, I need to create a fake NetworkService to fix the test |
|
I replaced the NetworkService parameter with a closure that just does |
fd5c870 to
19cab74
Compare
Related to #7