Skip to content

Commit

Permalink
make it actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Oct 17, 2024
1 parent cc678c6 commit 42ef263
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion substrate/client/service/src/client/call_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use sp_externalities::Extensions;
use sp_runtime::{
generic::BlockId,
traits::{Block as BlockT, HashingFor},
;
};
use sp_state_machine::{
backend::{AsTrieBackend, TryPendingCode},
OverlayedChanges, StateMachine, StorageProof,
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,6 @@ where
sp_io::init_tracing();
sp_tracing::enter_span!(sp_tracing::Level::TRACE, "finalize_block");

<frame_system::Pallet<System>>::maybe_apply_pending_code_upgrade();
// In this case there were no transactions to trigger this state transition:
if !<frame_system::Pallet<System>>::inherents_applied() {
Self::inherents_applied();
Expand Down Expand Up @@ -766,6 +765,7 @@ where
/// Run the `on_finalize` hook of all pallet.
fn on_finalize_hook(block_number: NumberFor<Block>) {
<AllPalletsWithSystem as OnFinalize<BlockNumberFor<System>>>::on_finalize(block_number);
<frame_system::Pallet<System>>::maybe_apply_pending_code_upgrade();
}

/// Apply extrinsic outside of the block execution function.
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/support/src/traits/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl PostInherents for Tuple {
}
}

/// Provides a callback to execute logic before the all transactions.
/// Provides a callback to execute logic after the all transactions.
pub trait PostTransactions {
/// Called after all transactions were applied but before `on_finalize`.
fn post_transactions() {}
Expand Down

0 comments on commit 42ef263

Please sign in to comment.