From eff8961dcf7880aa7e438463203611a8a0088554 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Tue, 27 Aug 2024 23:07:26 +0800 Subject: [PATCH] Fix flaky fuzzer test (#2749) --- Cargo.lock | 1 + runtime/Cargo.toml | 1 + runtime/src/bank/tests.rs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index ae84f0371cd5c8..a85583c01b9111 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7312,6 +7312,7 @@ dependencies = [ name = "solana-runtime" version = "2.1.0" dependencies = [ + "agave-transaction-view", "aquamarine", "arrayref", "assert_matches", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 3e3573f0eeb9d8..9afeea8c469f02 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -94,6 +94,7 @@ crate-type = ["lib"] name = "solana_runtime" [dev-dependencies] +agave-transaction-view = { workspace = true } assert_matches = { workspace = true } ed25519-dalek = { workspace = true } libsecp256k1 = { workspace = true } diff --git a/runtime/src/bank/tests.rs b/runtime/src/bank/tests.rs index 34be9d6aab66a8..184c3ec9a55033 100644 --- a/runtime/src/bank/tests.rs +++ b/runtime/src/bank/tests.rs @@ -16,6 +16,7 @@ use { snapshot_bank_utils, snapshot_utils, status_cache::MAX_CACHE_ENTRIES, }, + agave_transaction_view::static_account_keys_meta::MAX_STATIC_ACCOUNTS_PER_PACKET, assert_matches::assert_matches, crossbeam_channel::{bounded, unbounded}, itertools::Itertools, @@ -6192,7 +6193,7 @@ fn test_fuzz_instructions() { }) .collect(); let (bank, _bank_forks) = bank.wrap_with_bank_forks_for_tests(); - let max_keys = 100; + let max_keys = MAX_STATIC_ACCOUNTS_PER_PACKET; let keys: Vec<_> = (0..max_keys) .enumerate() .map(|_| {