Skip to content
Snippets Groups Projects
  • thiolliere's avatar
    StorageWeightReclaim: Fix issue when underestimating refund. (#5273) · 862860ec
    thiolliere authored
    The code do reduce or increase the weight by comparing
    `benchmarked_weight` and `consumed_weight`.
    
    But `benchmarked_weight` is the pre dispatch weight. not the post
    dispatch weight that is actually written into the block weight by
    `CheckWeight`.
    
    So in case the consumed weight was: `pre dispatch weight > consumed
    weight > post dispatch weight` then the reclaim code was reducing the
    block weight instead of increasing it.
    
    Might explain this issue even better
    https://github.com/paritytech/polkadot-sdk/issues/5229
    
    @skunert 
    @s0me0ne-unkn0wn
    Unverified
    862860ec
Code owners
Assign users and groups as approvers for specific file changes. Learn more.