You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node/src/block_producer/block_producer_reducer.rs
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,7 @@ impl BlockProducerEnabled {
134
134
won_slot, chain, ..
135
135
} = &mut state.current
136
136
else{
137
+
bug_condition!("Invalid state for `BlockProducerAction::WonSlotTransactionsGet` expected: `BlockProducerCurrentState::WonSlotProduceInit`, found: {:?}", state.current);
137
138
return;
138
139
};
139
140
@@ -153,6 +154,7 @@ impl BlockProducerEnabled {
153
154
won_slot, chain, ..
154
155
} = &mut state.current
155
156
else{
157
+
bug_condition!("Invalid state for `BlockProducerAction::WonSlotTransactionsSuccess` expected: `BlockProducerCurrentState::WonSlotTransactionsGet`, found: {:?}", state.current);
156
158
return;
157
159
};
158
160
@@ -178,6 +180,7 @@ impl BlockProducerEnabled {
178
180
..
179
181
} = &mut state.current
180
182
else{
183
+
bug_condition!("Invalid state for `BlockProducerAction::StagedLedgerDiffCreatePending` expected: `BlockProducerCurrentState::WonSlotTransactionsSuccess`, found: {:?}", state.current);
bug_condition!("Invalid state for `BlockProducerAction::StagedLedgerDiffCreateSuccess` expected: `BlockProducerCurrentState::StagedLedgerDiffCreatePending`, found: {:?}", state.current);
bug_condition!("Invalid state for `BlockProducerAction::BlockProvePending` expected: `BlockProducerCurrentState::BlockUnprovenBuilt`, found: {:?}", current_state);
bug_condition!("Invalid state for `BlockProducerAction::BlockProveSuccess` expected: `BlockProducerCurrentState::BlockProvePending`, found: {:?}", current_state);
bug_condition!("Invalid state for `BlockProducerAction::BlockProduced` expected: `BlockProducerCurrentState::BlockProveSuccess`, found: {:?}", current_state);
289
305
}
290
306
291
307
let dispatcher = state_context.into_dispatcher();
@@ -301,6 +317,7 @@ impl BlockProducerEnabled {
301
317
let blocks_inbetween = iter.map(|b| b.hash().clone()).collect();
bug_condition!("Invalid state for `BlockProducerAction::BlockUnprovenBuild` expected: `BlockProducerCurrentState::StagedLedgerDiffCreateSuccess`, found: {:?}", current_state);
365
387
return;
366
388
};
367
389
letSome(pred_block) = chain.last()else{
390
+
bug_condition!("Invalid state for `BlockProducerAction::BlockUnprovenBuild`: did not find predecessor block");
0 commit comments