Skip to content

Commit ddb5242

Browse files
starknet_transaction_prover: finalize test recordings only after assertions pass (#14212)
1 parent 5ba2fce commit ddb5242

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

crates/starknet_transaction_prover/src/proving/virtual_snos_prover_test.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ async fn test_prove_transfer_transaction() {
7373
// Run the full prover pipeline: OS execution → proof generation.
7474
let result = prover.prove_transaction(BlockId::Latest, rpc_tx).await;
7575

76-
// Finalize recording before asserting so records are saved even on failure.
77-
test_mode.finalize();
78-
7976
// Verify execution and proving succeeded.
8077
let output = result.expect("prove_transaction should succeed");
8178

@@ -86,4 +83,6 @@ async fn test_prove_transfer_transaction() {
8683
.await
8784
.expect("proof verification task panicked")
8885
.expect("proof verification should succeed");
86+
87+
test_mode.finalize();
8988
}

crates/starknet_transaction_prover/src/running/virtual_block_executor_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ async fn test_execute_with_prefetch() {
219219
.await
220220
.unwrap();
221221

222-
test_mode.finalize();
223-
224222
let result = result.expect("execute with prefetch should succeed");
225223

226224
assert_eq!(result.execution_outputs.len(), 1, "Should have exactly one execution output");
@@ -231,6 +229,8 @@ async fn test_execute_with_prefetch() {
231229
"Transaction should not revert. Error: {:?}",
232230
execution_info.revert_error
233231
);
232+
233+
test_mode.finalize();
234234
}
235235

236236
/// Verifies that a transaction is rejected when the bouncer config has tight capacity limits.

0 commit comments

Comments
 (0)