mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-08 00:03:09 +00:00
add test_gas_limits_check_sufficient_funds
This commit is contained in:
parent
c1aa0d0004
commit
2fadf0c82f
@ -420,6 +420,8 @@ pub fn verify(receipt: Receipt, image_id: impl Into<Digest>) -> anyhow::Result<(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::gas_calculator::GasCalculator;
|
||||
|
||||
use super::*;
|
||||
use test_methods::BIG_CALCULATION_ELF;
|
||||
use test_methods::{MULTIPLICATION_ELF, MULTIPLICATION_ID};
|
||||
@ -514,4 +516,15 @@ mod tests {
|
||||
|
||||
res
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_gas_limits_check_sufficient_funds() {
|
||||
let message = 1;
|
||||
let message_2 = 2;
|
||||
let gas_calc = GasCalculator::new(1, 1, 1, 1, 1, 1000000, 1000000);
|
||||
|
||||
let result = gas_limits_check(vec![message, message_2], SUMMATION_ELF, &gas_calc, 1000000);
|
||||
assert!(result.is_ok());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user