Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

get_vote_accounts() doesn't work with forks #2994

Closed
rob-solana opened this issue Feb 28, 2019 · 4 comments
Closed

get_vote_accounts() doesn't work with forks #2994

rob-solana opened this issue Feb 28, 2019 · 4 comments

Comments

@rob-solana
Copy link
Contributor

Problem

when setting a vote account balance to zero in a child fork, the parent fork is also cleared

Proposed Solution

introduce a forks-oriented index for the vote accounts cache

@rob-solana
Copy link
Contributor Author

CC @sakridge

rob-solana added a commit to rob-solana/solana that referenced this issue Feb 28, 2019
rob-solana added a commit that referenced this issue Feb 28, 2019
@sakridge
Copy link
Contributor

@rob-solana this seems to be the same problem we fix by filtering account.tokens == 0 in the Accounts::load* functions, seems like there can be an Accounts::get_vote_accounts which does this filtering in the same fashion, what do you think?

@rob-solana
Copy link
Contributor Author

@sakridge, I don't think that's the issue. try uncommenting and running that test, which shows that the vote_accounts are deleted in the parent

@rob-solana
Copy link
Contributor Author

vote_accounts probably needs to have a form that's similar to transaction_count

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants