diff --git a/tests/src/test_btc.rs b/tests/src/test_btc.rs index aa3f808..a396861 100644 --- a/tests/src/test_btc.rs +++ b/tests/src/test_btc.rs @@ -79,7 +79,8 @@ fn test_success() { let tx_resolved = ckb_types::core::cell::resolve_transaction(tx, &mut std::collections::HashSet::new(), &dl, &dl).unwrap(); let verifier = Verifier::default(); - verifier.verify(&tx_resolved, &dl).unwrap(); + let cycles = verifier.verify(&tx_resolved, &dl).unwrap(); + assert!(cycles <= 4718592); } #[test] @@ -255,3 +256,8 @@ fn test_success_e2e() { let verifier = Verifier::default(); verifier.verify(&tx_resolved, &dl).unwrap(); } + +#[test] +fn test_check_size() { + assert!(BINARY_CCC_LOCK_BTC.len() <= 150 * 1024); +} diff --git a/tests/src/test_eth.rs b/tests/src/test_eth.rs index 05edbff..551e731 100644 --- a/tests/src/test_eth.rs +++ b/tests/src/test_eth.rs @@ -94,7 +94,8 @@ fn test_success() { let tx_resolved = ckb_types::core::cell::resolve_transaction(tx, &mut std::collections::HashSet::new(), &dl, &dl).unwrap(); let verifier = Verifier::default(); - verifier.verify(&tx_resolved, &dl).unwrap(); + let cycles = verifier.verify(&tx_resolved, &dl).unwrap(); + assert!(cycles <= 4718592); } #[test] @@ -235,3 +236,8 @@ fn test_success_e2e() { let verifier = Verifier::default(); verifier.verify(&tx_resolved, &dl).unwrap(); } + +#[test] +fn test_check_size() { + assert!(BINARY_CCC_LOCK_ETH.len() <= 150 * 1024); +} diff --git a/tests/src/test_sol.rs b/tests/src/test_sol.rs index a26ab7d..011d18d 100644 --- a/tests/src/test_sol.rs +++ b/tests/src/test_sol.rs @@ -68,7 +68,8 @@ fn test_success() { let tx_resolved = ckb_types::core::cell::resolve_transaction(tx, &mut std::collections::HashSet::new(), &dl, &dl).unwrap(); let verifier = Verifier::default(); - verifier.verify(&tx_resolved, &dl).unwrap(); + let cycles = verifier.verify(&tx_resolved, &dl).unwrap(); + assert!(cycles <= 2621440); } #[test] @@ -177,3 +178,8 @@ fn test_success_e2e() { let verifier = Verifier::default(); verifier.verify(&tx_resolved, &dl).unwrap(); } + +#[test] +fn test_check_size() { + assert!(BINARY_CCC_LOCK_SOL.len() <= 100 * 1024); +}