File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 55//! non-inherent extrinsics and avoid authoring empty blocks.
66//! 2. There is an incoming downward message from the relay chain.
77//! 3. There is a go-ahead signal for a parachain code upgrade.
8+ //! 4. The block is the first block of the parachain. Useful for testing.
89//!
910//! If any of these conditions are met, then the block is authored.
1011
@@ -83,8 +84,13 @@ impl<P: ProposerInterface<Block> + Send> ProposerInterface<Block> for BlockLimit
8384 Ok ( None ) => false ,
8485 }
8586 } ;
87+ let first_block = {
88+ // allow creating the first block without the above conditions. This is useful for
89+ // testing for detection of healthiness.
90+ parent_header. number == 0
91+ } ;
8692
87- if has_downward_message || has_go_ahead || has_transactions {
93+ if has_downward_message || has_go_ahead || has_transactions || first_block {
8894 self . inner
8995 . propose (
9096 parent_header,
You can’t perform that action at this time.
0 commit comments