Skip to content

Commit 2d1e4f2

Browse files
test(vapp): tighten corrupted-request-sig assertion
1 parent 77e31b1 commit 2d1e4f2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

crates/vapp/tests/clear.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,9 +1412,14 @@ fn test_clear_invalid_request_signature() {
14121412
clear.request.signature[0] ^= 0xFF;
14131413
}
14141414

1415-
// Execute should fail because the corrupted request signature recovers the wrong address.
1415+
// A bit-flipped ECDSA signature either fails recovery or recovers a different signer
1416+
// that then fails the request_id binding.
14161417
let result = test.state.execute::<MockVerifier>(&clear_tx);
1417-
assert!(result.is_err());
1418+
assert!(matches!(
1419+
result,
1420+
Err(VAppError::Panic(VAppPanic::InvalidSignature { .. }))
1421+
| Err(VAppError::Panic(VAppPanic::RequestIdMismatch { .. }))
1422+
));
14181423
}
14191424

14201425
#[test]

0 commit comments

Comments
 (0)