avalanche-rosetta icon indicating copy to clipboard operation
avalanche-rosetta copied to clipboard

only lookup staked account balance when needed

Open bilgehansahin opened this issue 1 year ago • 0 comments

Currently we call GetStake for every account balance lookup call irrespective of the sub account type requested. In testnet this is not an issue but in mainnet, P-Chain getStake API calls can take upwards of 15-20 seconds. This change limits getStake calls to total (default) and staked sub account type balance.

Testing

Unit test, testnet data validation and mainnet spot check

bilgehansahin avatar Mar 17 '23 07:03 bilgehansahin