Skip to content

Commit

Permalink
fix failing app tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilyjjo committed Jul 31, 2024
1 parent 208a3b8 commit ce4f642
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion crates/astria-sequencer/src/app/tests_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,14 @@ async fn app_execution_results_match_proposal_vs_after_proposal() {
assert_eq!(prepare_proposal_result.txs, finalize_block.txs);
assert_eq!(app.executed_proposal_hash, Hash::default());
assert_eq!(app.validator_address.unwrap(), proposer_address);

// run maintence to clear out transactions
let current_account_nonce_getter = |address: Address| app.state.get_account_nonce(address);
app.mempool
.run_maintenance(current_account_nonce_getter)
.await
.unwrap();

assert_eq!(app.mempool.len().await, 0);

// call process_proposal - should not re-execute anything.
Expand Down Expand Up @@ -580,10 +588,18 @@ async fn app_prepare_proposal_cometbft_max_bytes_overflow_ok() {
"total transaction length should be three, including the two commitments and the one tx \
that fit"
);

// run maintence to clear out transactions
let current_account_nonce_getter = |address: Address| app.state.get_account_nonce(address);
app.mempool
.run_maintenance(current_account_nonce_getter)
.await
.unwrap();

assert_eq!(
app.mempool.len().await,
1,
"mempool should have re-added the tx that was too large"
"mempool should have still have the tx that was too large"
);
}

Expand Down Expand Up @@ -653,6 +669,14 @@ async fn app_prepare_proposal_sequencer_max_bytes_overflow_ok() {
"total transaction length should be three, including the two commitments and the one tx \
that fit"
);

// run maintence to clear out transactions
let current_account_nonce_getter = |address: Address| app.state.get_account_nonce(address);
app.mempool
.run_maintenance(current_account_nonce_getter)
.await
.unwrap();

assert_eq!(
app.mempool.len().await,
1,
Expand Down

0 comments on commit ce4f642

Please sign in to comment.