@@ -66,42 +66,42 @@ fn expect_strategies(
6666// # see the PR #575 for more context.
6767#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
6868async fn test_ix_commit_single_account_100_bytes() {
69- commit_single_account(100, CommitStrategy::Args , false).await;
69+ commit_single_account(100, CommitStrategy::StateArgs , false).await;
7070}
7171
7272// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
7373// # see the PR #575 for more context.
7474#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
7575async fn test_ix_commit_single_account_100_bytes_and_undelegate() {
76- commit_single_account(100, CommitStrategy::Args , true).await;
76+ commit_single_account(100, CommitStrategy::StateArgs , true).await;
7777}
7878
7979// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
8080// # see the PR #575 for more context.
8181#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
8282async fn test_ix_commit_single_account_800_bytes() {
83- commit_single_account(800, CommitStrategy::FromBuffer , false).await;
83+ commit_single_account(800, CommitStrategy::StateBuffer , false).await;
8484}
8585
8686// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
8787// # see the PR #575 for more context.
8888#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
8989async fn test_ix_commit_single_account_800_bytes_and_undelegate() {
90- commit_single_account(800, CommitStrategy::FromBuffer , true).await;
90+ commit_single_account(800, CommitStrategy::StateBuffer , true).await;
9191}
9292
9393// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
9494// # see the PR #575 for more context.
9595#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
9696async fn test_ix_commit_single_account_one_kb() {
97- commit_single_account(1024, CommitStrategy::FromBuffer , false).await;
97+ commit_single_account(1024, CommitStrategy::StateBuffer , false).await;
9898}
9999
100100// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
101101// # see the PR #575 for more context.
102102#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
103103async fn test_ix_commit_single_account_ten_kb() {
104- commit_single_account(10 * 1024, CommitStrategy::FromBuffer , false).await;
104+ commit_single_account(10 * 1024, CommitStrategy::StateBuffer , false).await;
105105}
106106
107107async fn commit_single_account(
@@ -176,7 +176,7 @@ async fn test_ix_commit_two_accounts_1kb_2kb() {
176176 &[1024, 2048],
177177 1,
178178 false,
179- expect_strategies(&[(CommitStrategy::Args , 2)]),
179+ expect_strategies(&[(CommitStrategy::StateArgs , 2)]),
180180 )
181181 .await;
182182}
@@ -190,7 +190,7 @@ async fn test_ix_commit_two_accounts_512kb() {
190190 &[512, 512],
191191 1,
192192 false,
193- expect_strategies(&[(CommitStrategy::Args , 2)]),
193+ expect_strategies(&[(CommitStrategy::StateArgs , 2)]),
194194 )
195195 .await;
196196}
@@ -204,7 +204,7 @@ async fn test_ix_commit_three_accounts_512kb() {
204204 &[512, 512, 512],
205205 1,
206206 false,
207- expect_strategies(&[(CommitStrategy::Args , 3)]),
207+ expect_strategies(&[(CommitStrategy::StateArgs , 3)]),
208208 )
209209 .await;
210210}
@@ -218,7 +218,7 @@ async fn test_ix_commit_six_accounts_512kb() {
218218 &[512, 512, 512, 512, 512, 512],
219219 1,
220220 false,
221- expect_strategies(&[(CommitStrategy::Args , 6)]),
221+ expect_strategies(&[(CommitStrategy::StateArgs , 6)]),
222222 )
223223 .await;
224224}
@@ -232,7 +232,7 @@ async fn test_ix_commit_four_accounts_1kb_2kb_5kb_10kb_single_bundle() {
232232 &[1024, 2 * 1024, 5 * 1024, 10 * 1024],
233233 1,
234234 false,
235- expect_strategies(&[(CommitStrategy::Args , 4)]),
235+ expect_strategies(&[(CommitStrategy::StateArgs , 4)]),
236236 )
237237 .await;
238238}
@@ -241,8 +241,11 @@ async fn test_ix_commit_four_accounts_1kb_2kb_5kb_10kb_single_bundle() {
241241// # see the PR #575 for more context.
242242#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
243243async fn test_commit_20_accounts_1kb_bundle_size_2() {
244- commit_20_accounts_1kb(2, expect_strategies(&[(CommitStrategy::Args, 20)]))
245- .await;
244+ commit_20_accounts_1kb(
245+ 2,
246+ expect_strategies(&[(CommitStrategy::StateArgs, 20)]),
247+ )
248+ .await;
246249}
247250
248251// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
@@ -251,7 +254,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_2() {
251254async fn test_commit_5_accounts_1kb_bundle_size_3() {
252255 commit_5_accounts_1kb(
253256 3,
254- expect_strategies(&[(CommitStrategy::Args , 5)]),
257+ expect_strategies(&[(CommitStrategy::StateArgs , 5)]),
255258 false,
256259 )
257260 .await;
@@ -265,8 +268,8 @@ async fn test_commit_5_accounts_1kb_bundle_size_3_undelegate_all() {
265268 3,
266269 expect_strategies(&[
267270 // Intent fits in 1 TX only with ALT, see IntentExecutorImpl::try_unite_tasks
268- (CommitStrategy::FromBufferWithLookupTable , 3),
269- (CommitStrategy::Args , 2),
271+ (CommitStrategy::StateBufferWithLookupTable , 3),
272+ (CommitStrategy::StateArgs , 2),
270273 ]),
271274 true,
272275 )
@@ -280,8 +283,8 @@ async fn test_commit_5_accounts_1kb_bundle_size_4() {
280283 commit_5_accounts_1kb(
281284 4,
282285 expect_strategies(&[
283- (CommitStrategy::Args , 1),
284- (CommitStrategy::FromBufferWithLookupTable , 4),
286+ (CommitStrategy::StateArgs , 1),
287+ (CommitStrategy::StateBufferWithLookupTable , 4),
285288 ]),
286289 false,
287290 )
@@ -295,8 +298,8 @@ async fn test_commit_5_accounts_1kb_bundle_size_4_undelegate_all() {
295298 commit_5_accounts_1kb(
296299 4,
297300 expect_strategies(&[
298- (CommitStrategy::Args , 1),
299- (CommitStrategy::FromBufferWithLookupTable , 4),
301+ (CommitStrategy::StateArgs , 1),
302+ (CommitStrategy::StateBufferWithLookupTable , 4),
300303 ]),
301304 true,
302305 )
@@ -309,7 +312,7 @@ async fn test_commit_5_accounts_1kb_bundle_size_4_undelegate_all() {
309312async fn test_commit_5_accounts_1kb_bundle_size_5_undelegate_all() {
310313 commit_5_accounts_1kb(
311314 5,
312- expect_strategies(&[(CommitStrategy::FromBufferWithLookupTable , 5)]),
315+ expect_strategies(&[(CommitStrategy::StateBufferWithLookupTable , 5)]),
313316 true,
314317 )
315318 .await;
@@ -319,8 +322,11 @@ async fn test_commit_5_accounts_1kb_bundle_size_5_undelegate_all() {
319322// # see the PR #575 for more context.
320323#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
321324async fn test_commit_20_accounts_1kb_bundle_size_3() {
322- commit_20_accounts_1kb(3, expect_strategies(&[(CommitStrategy::Args, 20)]))
323- .await;
325+ commit_20_accounts_1kb(
326+ 3,
327+ expect_strategies(&[(CommitStrategy::StateArgs, 20)]),
328+ )
329+ .await;
324330}
325331
326332// TODO (snawaz): use #[tokio::test] once CommitTask::new() stops using blocking RpcClient
@@ -329,7 +335,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_3() {
329335async fn test_commit_20_accounts_1kb_bundle_size_4() {
330336 commit_20_accounts_1kb(
331337 4,
332- expect_strategies(&[(CommitStrategy::FromBufferWithLookupTable , 20)]),
338+ expect_strategies(&[(CommitStrategy::StateBufferWithLookupTable , 20)]),
333339 )
334340 .await;
335341}
@@ -341,9 +347,9 @@ async fn test_commit_20_accounts_1kb_bundle_size_6() {
341347 commit_20_accounts_1kb(
342348 6,
343349 expect_strategies(&[
344- (CommitStrategy::FromBufferWithLookupTable , 18),
350+ (CommitStrategy::StateBufferWithLookupTable , 18),
345351 // Two accounts don't make it into the bundles of size 6
346- (CommitStrategy::Args , 2),
352+ (CommitStrategy::StateArgs , 2),
347353 ]),
348354 )
349355 .await;
@@ -355,7 +361,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_6() {
355361async fn test_commit_20_accounts_1kb_bundle_size_20() {
356362 commit_20_accounts_1kb(
357363 20,
358- expect_strategies(&[(CommitStrategy::FromBufferWithLookupTable , 20)]),
364+ expect_strategies(&[(CommitStrategy::StateBufferWithLookupTable , 20)]),
359365 )
360366 .await;
361367}
@@ -369,7 +375,7 @@ async fn test_commit_8_accounts_1kb_bundle_size_8() {
369375 expect_strategies(&[
370376 // Four accounts don't make it into the bundles of size 8, but
371377 // that bundle also needs lookup tables
372- (CommitStrategy::FromBufferWithLookupTable , 8),
378+ (CommitStrategy::StateBufferWithLookupTable , 8),
373379 ]),
374380 )
375381 .await;
@@ -384,7 +390,7 @@ async fn test_commit_20_accounts_1kb_bundle_size_8() {
384390 expect_strategies(&[
385391 // Four accounts don't make it into the bundles of size 8, but
386392 // that bundle also needs lookup tables
387- (CommitStrategy::FromBufferWithLookupTable , 20),
393+ (CommitStrategy::StateBufferWithLookupTable , 20),
388394 ]),
389395 )
390396 .await;
0 commit comments