File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,11 @@ impl<N: Network> Block<N> {
137
137
previous_height : u32 ,
138
138
current_committee : & Committee < N > ,
139
139
) -> Result < ( u64 , u32 , i64 ) > {
140
+ #[ cfg( not( any( test, feature = "test" ) ) ) ]
141
+ ensure ! ( self . authority. is_quorum( ) , "The next block must be a quorum block" ) ;
142
+
140
143
// Determine the expected height.
141
144
let expected_height = previous_height. saturating_add ( 1 ) ;
142
- // Ensure the block type is correct.
143
- match expected_height == 0 {
144
- true => ensure ! ( self . authority. is_beacon( ) , "The genesis block must be a beacon block" ) ,
145
- false => {
146
- #[ cfg( not( any( test, feature = "test" ) ) ) ]
147
- ensure ! ( self . authority. is_quorum( ) , "The next block must be a quorum block" ) ;
148
- }
149
- }
150
145
151
146
// Determine the expected round.
152
147
let expected_round = match & self . authority {
You can’t perform that action at this time.
0 commit comments