mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Remove execute_extrinsics_without_checks as it will not be required (#2145)
This functionality was added by me for Cumulus, but after better understanding Cumulus, this will not be required.
This commit is contained in:
@@ -52,8 +52,6 @@ mod internal {
|
||||
pub trait ExecuteBlock<Block: BlockT> {
|
||||
/// Actually execute all transitioning for `block`.
|
||||
fn execute_block(block: Block);
|
||||
/// Execute all extrinsics like when executing a `block`, but with dropping intial and final checks.
|
||||
fn execute_extrinsics_without_checks(block_number: NumberFor<Block>, extrinsics: Vec<Block::Extrinsic>);
|
||||
}
|
||||
|
||||
pub struct Executive<System, Block, Context, Payment, AllModules>(
|
||||
@@ -75,10 +73,6 @@ impl<
|
||||
fn execute_block(block: Block) {
|
||||
Executive::<System, Block, Context, Payment, AllModules>::execute_block(block);
|
||||
}
|
||||
|
||||
fn execute_extrinsics_without_checks(block_number: NumberFor<Block>, extrinsics: Vec<Block::Extrinsic>) {
|
||||
Executive::<System, Block, Context, Payment, AllModules>::execute_extrinsics_without_checks(block_number, extrinsics);
|
||||
}
|
||||
}
|
||||
|
||||
impl<
|
||||
@@ -134,18 +128,6 @@ impl<
|
||||
Self::final_checks(&header);
|
||||
}
|
||||
|
||||
/// Execute all extrinsics like when executing a `block`, but with dropping intial and final checks.
|
||||
pub fn execute_extrinsics_without_checks(block_number: NumberFor<Block>, extrinsics: Vec<Block::Extrinsic>) {
|
||||
// Make the api happy, but maybe we should not set them at all.
|
||||
let parent_hash = <Block::Header as Header>::Hashing::hash(b"parent_hash");
|
||||
let extrinsics_root = <Block::Header as Header>::Hashing::hash(b"extrinsics_root");
|
||||
|
||||
Self::initialize_block_impl(&block_number, &parent_hash, &extrinsics_root);
|
||||
|
||||
// execute extrinsics
|
||||
Self::execute_extrinsics_with_book_keeping(extrinsics, block_number);
|
||||
}
|
||||
|
||||
/// Execute given extrinsics and take care of post-extrinsics book-keeping
|
||||
fn execute_extrinsics_with_book_keeping(extrinsics: Vec<Block::Extrinsic>, block_number: NumberFor<Block>) {
|
||||
extrinsics.into_iter().for_each(Self::apply_extrinsic_no_note);
|
||||
|
||||
Reference in New Issue
Block a user