Skip to content

Conversation

@lgalabru
Copy link
Member

No description provided.

@lgalabru lgalabru requested a review from MicaiahReid October 21, 2025 19:09
Comment on lines +656 to +700
let mut inner = LiteSVM::new()
.with_feature_set(self.feature_set.clone())
.with_blockhash_check(false)
.with_sigverify(false);

// Add the native mint (SOL) to the SVM
create_native_mint(&mut inner);
let native_mint_account = inner
.get_account(&spl_token_interface::native_mint::ID)
.unwrap();
let parsed_mint_account = MintAccount::unpack(&native_mint_account.data).unwrap();

// Load native mint into owned account and token mint indexes
let accounts_by_owner = HashMap::from([(
native_mint_account.owner,
vec![spl_token_interface::native_mint::ID],
)]);
let token_mints =
HashMap::from([(spl_token_interface::native_mint::ID, parsed_mint_account)]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think it's worth putting this in a function that's used by both new/reset_network to DRY this up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, we already have a new and initialize functions, let's keep it in our visor and pull the trigger if it gets more complex?

lgalabru and others added 2 commits October 22, 2025 15:13
@MicaiahReid MicaiahReid merged commit 0d2a3b6 into main Oct 22, 2025
3 checks passed
@lgalabru lgalabru deleted the feat/reset-network branch November 3, 2025 16:23
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.

3 participants