From 3f0a18be65d1712e45dde88dd434cb758ef3fa0b Mon Sep 17 00:00:00 2001 From: segfaultdoctor <17258903+segfaultdoc@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:18:55 -0400 Subject: [PATCH] add upsert to accountoverrides --- accounts-db/src/account_overrides.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accounts-db/src/account_overrides.rs b/accounts-db/src/account_overrides.rs index 0761610063..d5d3286426 100644 --- a/accounts-db/src/account_overrides.rs +++ b/accounts-db/src/account_overrides.rs @@ -10,6 +10,10 @@ pub struct AccountOverrides { } impl AccountOverrides { + pub fn upsert_account_overrides(&mut self, other: AccountOverrides) { + self.accounts.extend(other.accounts); + } + pub fn set_account(&mut self, pubkey: &Pubkey, account: Option) { match account { Some(account) => self.accounts.insert(*pubkey, account),