Skip to content

Commit

Permalink
remove outdated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszaaa committed Dec 11, 2022
1 parent 2731027 commit 9b401ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
24 changes: 1 addition & 23 deletions frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ where


let enqueueq_blocks_count_before = <frame_system::Pallet<System>>::enqueued_blocks_count();
Self::execute_extrinsics_impl(tx_to_be_executed, *header.number());
Self::execute_extrinsics_with_book_keeping(tx_to_be_executed, *header.number());
let enqueueq_blocks_count_after = <frame_system::Pallet<System>>::enqueued_blocks_count();
assert!(enqueueq_blocks_count_before == 0 || (poped_txs_count.saturated_into::<u64>() != 0u64 || enqueueq_blocks_count_before == enqueueq_blocks_count_after), "Collator didnt execute enqueued txs");

Expand Down Expand Up @@ -634,28 +634,6 @@ where
Self::idle_and_finalize_hook(block_number);
}

#[cfg(not(feature = "disable-execution"))]
/// regular impl execute inherents & extrinsics
fn execute_extrinsics_impl(extrinsics: Vec<Block::Extrinsic>, block_number: NumberFor<Block>) {
Self::execute_extrinsics_with_book_keeping(extrinsics, block_number)
}

#[cfg(feature = "disable-execution")]
/// impl for benchmark - execute inherents only
fn execute_extrinsics_impl(extrinsics: Vec<Block::Extrinsic>, block_number: NumberFor<Block>) {
extrinsics.into_iter().filter(|e| !e.is_signed().unwrap()).for_each(|e| {
if let Err(e) = Self::apply_extrinsic(e) {
let err: &'static str = e.into();
panic!("{}", err)
}
});

// post-extrinsics book-keeping
<frame_system::Pallet<System>>::note_finished_extrinsics();

Self::idle_and_finalize_hook(block_number);
}

/// Finalize the block - it is up the caller to ensure that all header fields are valid
/// except state-root.
pub fn finalize_block() -> System::Header {
Expand Down
1 change: 0 additions & 1 deletion frame/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,6 @@ impl<T: Config> Pallet<T> {

/// store seed and shuffle extrinsics from precedesing block
pub fn set_block_seed(seed: &sp_core::H256) {
// TODO check in on_finalize if seed has been set for every block
sp_runtime::runtime_logger::RuntimeLogger::init();
<BlockSeed<T>>::put(seed);
let mut queue = <StorageQueue<T>>::get();
Expand Down

0 comments on commit 9b401ea

Please sign in to comment.