-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathbootstrap_declare.rs
More file actions
35 lines (33 loc) · 1.29 KB
/
Copy pathbootstrap_declare.rs
File metadata and controls
35 lines (33 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use apollo_infra_utils::test_utils::TestIdentifier;
use apollo_integration_tests::utils::{
end_to_end_flow,
test_single_tx,
EndToEndFlowArgs,
EndToEndTestScenario,
};
use mempool_test_utils::starknet_api_test_utils::generate_bootstrap_declare;
use starknet_api::execution_resources::GasAmount;
fn create_bootstrap_declare_scenario() -> EndToEndTestScenario {
EndToEndTestScenario {
create_rpc_txs_fn: |_| vec![generate_bootstrap_declare()],
create_l1_to_l2_messages_args_fn: |_| vec![],
test_tx_hashes_fn: test_single_tx,
}
}
/// Bootstrap declare txs are unique: they are sent from a special address and do not increment its
/// nonce. As a result, they are not removed from the mempool upon successful execution, and will
/// only be removed after being rejected during a subsequent attempt.
/// The test uses 3 threads: 1 for the test's main thread and 2 for the sequencers.
#[tokio::test(flavor = "multi_thread", worker_threads = 3)]
async fn bootstrap_declare() {
end_to_end_flow(
EndToEndFlowArgs::new(
TestIdentifier::EndToEndFlowTestBootstrapDeclare,
create_bootstrap_declare_scenario(),
GasAmount(29000000),
)
.allow_bootstrap_txs()
.proposal_margin_millis(100, 1000),
)
.await
}