hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
310 stars 136 forks source link

Validate account balances in StateValidationTool #14793

Closed Neeharika-Sompalli closed 1 month ago

Neeharika-Sompalli commented 2 months ago

It will be nice to have , if the StateValidationTool can check if

  1. any account has negative balance
  2. sum of balances of all accounts is equal to ledger.totalTinyBarFloat=5000000000000000000
imalygin commented 2 months ago

Currently we have TotalHbarSupplyIs_50B which already calculates the total amount on all account. We should rename this class to AccountValidator and rename its tag from totalSupply to account as well) and add one more assert that checks that there are no negative balances.