Skip to content

Commit 17f03fd

Browse files
committed
Additional logging
1 parent 7192a7d commit 17f03fd

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git",
7878
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }
7979
sp-trie = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }
8080
sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }
81+
sp-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }
8182

8283
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }
8384
pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "a64eb1fb02d4012948cba024fca2f27d94732e52", default-features = false }

pallets/transaction-storage/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ pub mod pallet {
814814
/// Returns `true` if no more store/renew transactions can be included in the current
815815
/// block.
816816
fn block_transactions_full() -> bool {
817+
log::trace!(target: LOG_TARGET, "BlockTransactions::<T>::decode_len(): {:?}", BlockTransactions::<T>::decode_len());
817818
BlockTransactions::<T>::decode_len()
818819
.map_or(false, |len| len >= T::MaxBlockTransactions::get() as usize)
819820
}

runtimes/bulletin-polkadot/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ sp-io = { workspace = true }
9797
sp-keyring = { workspace = true }
9898
sp-trie = { workspace = true }
9999
static_assertions = { workspace = true }
100+
sp-tracing = { workspace = true }
100101

101102
[features]
102103
default = ["std"]

runtimes/bulletin-polkadot/tests/tests.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,22 @@ fn construct_and_apply_extrinsic(
6262
account: sp_core::sr25519::Pair,
6363
call: RuntimeCall,
6464
) -> ApplyExtrinsicResult {
65+
let dispatch_info = call.get_dispatch_info();
6566
let xt = construct_extrinsic(account, call)?;
67+
let xt_len = xt.encode().len();
68+
log::info!(
69+
"Applying extrinsic: class={:?} pays_fee={:?} weight={:?} encoded_len={} bytes",
70+
dispatch_info.class,
71+
dispatch_info.pays_fee,
72+
dispatch_info.total_weight(),
73+
xt_len
74+
);
6675
Executive::apply_extrinsic(xt)
6776
}
6877

6978
#[test]
7079
fn transaction_storage_runtime_sizes() {
80+
let _ = sp_tracing::try_init_simple();
7181
sp_io::TestExternalities::new(
7282
runtime::RuntimeGenesisConfig::default().build_storage().unwrap(),
7383
)

0 commit comments

Comments
 (0)