Skip to content

Commit

Permalink
Fix extrinsics count logging in frame-system
Browse files Browse the repository at this point in the history
The storage item ExtrinsicIndex is already taken before the `finalize()`
in `note_finished_extrinsics()`, rendering it's always 0 in the log.
This commit fixes it by using the proper API for extrinsics count.
  • Loading branch information
liuchengxu committed May 15, 2024
1 parent 12ab315 commit 7173d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion substrate/frame/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ impl<T: Config> Pallet<T> {
"[{:?}] {} extrinsics, length: {} (normal {}%, op: {}%, mandatory {}%) / normal weight:\
{} ({}%) op weight {} ({}%) / mandatory weight {} ({}%)",
Self::block_number(),
Self::extrinsic_index().unwrap_or_default(),
Self::extrinsic_count(),
Self::all_extrinsics_len(),
sp_runtime::Percent::from_rational(
Self::all_extrinsics_len(),
Expand Down

0 comments on commit 7173d03

Please sign in to comment.