File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 5
5
//! non-inherent extrinsics and avoid authoring empty blocks.
6
6
//! 2. There is an incoming downward message from the relay chain.
7
7
//! 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.
8
9
//!
9
10
//! If any of these conditions are met, then the block is authored.
10
11
@@ -83,8 +84,13 @@ impl<P: ProposerInterface<Block> + Send> ProposerInterface<Block> for BlockLimit
83
84
Ok ( None ) => false ,
84
85
}
85
86
} ;
87
+ let first_block = {
88
+ // allow creating the first block without the above conditions. This is useful for
89
+ // testing for detection of healthyness.
90
+ parent_header. number == 0
91
+ } ;
86
92
87
- if has_downward_message || has_go_ahead || has_transactions {
93
+ if has_downward_message || has_go_ahead || has_transactions || first_block {
88
94
self . inner
89
95
. propose (
90
96
parent_header,
You can’t perform that action at this time.
0 commit comments