Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add way to fetch un-cached reward balances & use from listStakeKeys
1. Rename existing getAccountBalance to getCachedAccountBalance to make its behaviour clearer. 2. Add new `fetchAccountBalances` to `NetworkLayer`. 3. Remove unused `ErrGetAccountBalance` error The error wasn't used, so it was just a cause for confusion and complexity. 4. Make listStakeKeys use use fetchAccountBalances instead of `getCachedAccountBalance`. getCachedAccountBalance will return 0 the first time it is called for a new stake key. This might not be appropriate for listing stake keys. Let's block and wait for new values from the node instead. If we see any performance problems in the future we can re-consider / go for a third option.
- Loading branch information
Showing
5 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters