Add an assertion in DbScanAppRewardStore that checks that the totalAppRewardAmount <= totalIssuance up to a small configurable tolerance (initially set to 0.001)
source
Make sure to never write any data if that assertion is false, as otherwise a restart of the SV app might nevertheless believe everything is in order and continue with the faulty reward issuance.
Add an assertion in DbScanAppRewardStore that checks that the
totalAppRewardAmount<=totalIssuanceup to a small configurable tolerance (initially set to 0.001)source
Make sure to never write any data if that assertion is false, as otherwise a restart of the SV app might nevertheless believe everything is in order and continue with the faulty reward issuance.