mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
Do not return the Header from execute_block (#8256)
That was actually a bad idea by me, because it should essentially be the same as block.header. Ty @kianenigma
This commit is contained in:
@@ -174,8 +174,8 @@ where
|
||||
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
|
||||
UnsignedValidator: ValidateUnsigned<Call=CallOf<Block::Extrinsic, Context>>,
|
||||
{
|
||||
fn execute_block(block: Block) -> Block::Header {
|
||||
Executive::<System, Block, Context, UnsignedValidator, AllModules>::execute_block(block)
|
||||
fn execute_block(block: Block) {
|
||||
Executive::<System, Block, Context, UnsignedValidator, AllModules>::execute_block(block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ where
|
||||
}
|
||||
|
||||
/// Actually execute all transitions for `block`.
|
||||
pub fn execute_block(block: Block) -> Block::Header {
|
||||
pub fn execute_block(block: Block) {
|
||||
sp_io::init_tracing();
|
||||
sp_tracing::within_span! {
|
||||
sp_tracing::info_span!("execute_block", ?block);
|
||||
@@ -333,7 +333,7 @@ where
|
||||
}
|
||||
|
||||
// any final checks
|
||||
Self::final_checks(&header)
|
||||
Self::final_checks(&header);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ where
|
||||
Ok(r.map(|_| ()).map_err(|e| e.error))
|
||||
}
|
||||
|
||||
fn final_checks(header: &System::Header) -> System::Header {
|
||||
fn final_checks(header: &System::Header) {
|
||||
sp_tracing::enter_span!(sp_tracing::Level::TRACE, "final_checks");
|
||||
// remove temporaries
|
||||
let new_header = <frame_system::Module<System>>::finalize();
|
||||
@@ -432,8 +432,6 @@ where
|
||||
header.extrinsics_root() == new_header.extrinsics_root(),
|
||||
"Transaction trie root must be valid.",
|
||||
);
|
||||
|
||||
new_header
|
||||
}
|
||||
|
||||
/// Check a given signed transaction for validity. This doesn't execute any
|
||||
|
||||
Reference in New Issue
Block a user