fn store_stakes(
        &self,
        txs: &[Transaction],
        res: &[Result<()>],
        loaded: &[Result<(InstructionAccounts, InstructionLoaders)>],
    ) {
        for (i, raccs) in loaded.iter().enumerate() {
            if res[i].is_err() || raccs.is_err() {
                continue;
            }

            let message = &txs[i].message();
            let acc = raccs.as_ref().unwrap();

            for (pubkey, account) in message
                .account_keys
                .iter()
                .zip(acc.0.iter())
                .filter(|(_, account)| Stakes::is_stake(account))
            {
                self.stakes.write().unwrap().store(pubkey, account);
            }
        }
    }
/// a bank-level cache of vote accounts
a bank-level cache of vote accounts
a bank - level cache of vote accounts
fn store_stakes(
        &self,
        txs: &[Transaction],
        res: &[Result<()>],
        loaded: &[Result<(InstructionAccounts, InstructionLoaders)>],
    ) {
        for (i, raccs) in loaded.iter().enumerate() {
            if res[i].is_err() || raccs.is_err() {
                continue;
            }
            let message = &txs[i].message();
            let acc = raccs.as_ref().unwrap();
            for (pubkey, account) in message
                .account_keys
                .iter()
                .zip(acc.0.iter())
                .filter(|(_, account)| Stakes::is_stake(account))
            {
                self.stakes.write().unwrap().store(pubkey, account);
            }
        }
    }
fn store_stakes ( & self , txs : & [ Transaction ] , res : & [ Result < ( ) > ] , loaded : & [ Result < ( InstructionAccounts , InstructionLoaders ) > ] , ) { for ( i , raccs ) in loaded . iter ( ) . enumerate ( ) { if res [ i ] . is_err ( ) || raccs . is_err ( ) { continue ; } let message = & txs [ i ] . message ( ) ; let acc = raccs . as_ref ( ) . unwrap ( ) ; for ( pubkey , account ) in message . account_keys . iter ( ) . zip ( acc . 0 . iter ( ) ) . filter ( | ( _ , account ) | Stakes :: is_stake ( account ) ) { self . stakes . write ( ) . unwrap ( ) . store ( pubkey , account ) ; } } }
a bank-level cache of vote accounts
a bank - level cache of vote accounts
&self
txs
&[Transaction]
res
&[Result<()>]
loaded
&[Result<(InstructionAccounts, InstructionLoaders)>]
&self
txs
&[Transaction]
res
&[Result<()>]
loaded
&[Result<(InstructionAccounts, InstructionLoaders)>]