Skip to content

Commit

Permalink
cache executors on failed transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmay committed Jan 5, 2022
1 parent 69e632a commit 5a4ec28
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions runtime/src/bank.rs
Expand Up @@ -3620,6 +3620,17 @@ impl Bank {
self.load_accounts_data_len(),
);

self.update_executors(executors.clone());

let status = process_result
.map(|info| {
self.store_accounts_data_len(info.accounts_data_len);
})
.map_err(|err| {
error_counters.instruction_error += 1;
err
});

let log_messages: Option<TransactionLogMessages> =
log_collector.and_then(|log_collector| {
Rc::try_unwrap(log_collector)
Expand All @@ -3633,16 +3644,6 @@ impl Bank {

loaded_transaction.accounts = transaction_context.deconstruct();

let status = process_result
.map(|info| {
self.store_accounts_data_len(info.accounts_data_len);
self.update_executors(executors);
})
.map_err(|err| {
error_counters.instruction_error += 1;
err
});

TransactionExecutionResult::Executed(TransactionExecutionDetails {
status,
log_messages,
Expand Down

0 comments on commit 5a4ec28

Please sign in to comment.