You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Aideepakchaudhary
Yes, this issue concerns the capacity and time-release pallets which use the fungible trait to freeze tokens. The issue was created while working on #1779, #1818, and #1873.
Here, the Existential Deposit (ED) for Test::ExistentialDeposit is set to 1. mock.rs defines Test as a simplified version of the pallet used for unit testing.
On testnet/mainnet, ED is set to a larger number = 1_000_000.
Therefore, there are valid scenarios on testnet/mainnet that can result in an account balance that is below ED but greater than 0.
Currently, it is not possible to use mock.rs and Test::ExistentialDeposit to test this scenario, as the only value less than ED in mock.rs is 0.
If Test::ExistentialDeposit is changed to a larger value, e.g. 10, it would allow unit tests to create a scenario where 0 < account_balance < ED.
However, this may also break the logic for the existing tests with ED == 1 and those tests would need to be updated to use the larger ED value.
As a developer, I would like to create some unit tests for situations when the account balance is less than the Existential Deposit (ED).
Currently, the mocks has ED == 1, so it is not possible to test any situations where ED < 1, which some valid edge cases do exist.
The text was updated successfully, but these errors were encountered: