This repository was archived by the owner on Nov 15, 2023. It is now read-only.
pallet-contract: Exempted contract doesn't upgrade their last rent payed #4742
Labels
I3-bug
The node fails to follow expected behavior.
Currently if a contract is exempted from rent (because it holds enough funds for instance) then the last deduct_block (block where it payed rent for the last time) is not updated: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/rent.rs#L181
Thus if a contract has enough funds to pay for 10MB and then it reaches 11MB or just lost some funds, the rent will be from the last time the contract had payed rent because deduct block would be the last time it has been charged.
The text was updated successfully, but these errors were encountered: