Skip to content

feat: block accounts per program id#566

Open
CanardMandarin wants to merge 3 commits intosolana-foundation:mainfrom
CanardMandarin:main
Open

feat: block accounts per program id#566
CanardMandarin wants to merge 3 commits intosolana-foundation:mainfrom
CanardMandarin:main

Conversation

@CanardMandarin
Copy link

This PR aims to fix #563 by adding a new cheatcode that prevents downloading an account and accounts its owns.

Half of the work was already done thanks to the existing closed_accounts logic.
I just renamed it blocked_accounts to be more generic.

/// Tracks accounts that have been explicitly closed by the user.
/// These accounts will not be fetched from mainnet even if they don't exist in the local cache.
pub closed_accounts: HashSet<Pubkey>,

The filtering happens at fetch time in SurfnetSvmLocker::filter_downloaded_account_result that I call in get_account_local_then_remote and get_multiple_accounts_with_remote_fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create surfnet_blockAccountDownload cheatcode

2 participants