Skip to content
Unverified Commit e8f7c81d authored by Oliver Tale-Yazdi's avatar Oliver Tale-Yazdi Committed by GitHub
Browse files

[balances] Safeguard against consumer ref underflow (#3865)



There are some accounts that do not have a consumer ref while having a
reserve.
This adds a fail-safe mechanism to trigger in the case that
`does_consume` is true, but the assumption of `consumer>0` is not.

This should prevent those accounts from loosing balance and the TI from
getting messed up even more, but is not an "ideal" fix. TBH an ideal fix
is not possible, since on-chain data is in an invalid state.

---------

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
parent 8f8c49de
Pipeline #469873 passed with stages
in 1 hour, 9 minutes, and 33 seconds