Skip to content
Snippets Groups Projects
Unverified Commit c9fbeb72 authored by paritytech-cmd-bot-polkadot-sdk[bot]'s avatar paritytech-cmd-bot-polkadot-sdk[bot] Committed by GitHub
Browse files

[stable2409] Backport #5594 (#5767)


Backport #5594 into `stable2409` from Moliholy.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: default avatarJosé Molina Colmenero <jose@blockdeep.io>
parent 56ce9012
Branches
No related merge requests found
......@@ -183,13 +183,15 @@ where
if consumed_weight > benchmarked_weight {
log::error!(
target: LOG_TARGET,
"Benchmarked storage weight smaller than consumed storage weight. benchmarked: {benchmarked_weight} consumed: {consumed_weight} unspent: {unspent}"
"Benchmarked storage weight smaller than consumed storage weight. extrinsic: {} benchmarked: {benchmarked_weight} consumed: {consumed_weight} unspent: {unspent}",
frame_system::Pallet::<T>::extrinsic_index().unwrap_or(0)
);
current.accrue(Weight::from_parts(0, storage_size_diff), info.class)
} else {
log::trace!(
target: LOG_TARGET,
"Reclaiming storage weight. benchmarked: {benchmarked_weight}, consumed: {consumed_weight} unspent: {unspent}"
"Reclaiming storage weight. extrinsic: {} benchmarked: {benchmarked_weight} consumed: {consumed_weight} unspent: {unspent}",
frame_system::Pallet::<T>::extrinsic_index().unwrap_or(0)
);
current.reduce(Weight::from_parts(0, storage_size_diff), info.class)
}
......
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
title: "Add debugging info for `StorageWeightReclaim`"
doc:
- audience: Runtime Dev
description: |
- Includes extrinsic index to be displayed in the logs when the consumed weight is higher than the measured one.
crates:
- name: cumulus-primitives-storage-weight-reclaim
bump: patch
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment