diff --git a/fuel-vm/src/checked_transaction.rs b/fuel-vm/src/checked_transaction.rs index 338ea1c1b5..783959eadd 100644 --- a/fuel-vm/src/checked_transaction.rs +++ b/fuel-vm/src/checked_transaction.rs @@ -1603,7 +1603,7 @@ mod tests { ) .unwrap() // Sets Checks::Predicates - .check_predicates(arb_gas_price, &check_predicate_params) + .check_predicates( &check_predicate_params) .unwrap(); assert!(checked .checks() diff --git a/fuel-vm/src/interpreter/executors/main/tests.rs b/fuel-vm/src/interpreter/executors/main/tests.rs index 9045aaea4b..f4bc7ca1be 100644 --- a/fuel-vm/src/interpreter/executors/main/tests.rs +++ b/fuel-vm/src/interpreter/executors/main/tests.rs @@ -56,7 +56,7 @@ fn estimate_gas_gives_proper_gas_used() { let transaction_without_predicate = builder .finalize_checked_basic(Default::default(), gas_price) - .check_predicates(gas_price, ¶ms.into()) + .check_predicates(¶ms.into()) .expect("Predicate check failed even if we don't have any predicates"); let mut client = MemoryClient::default(); @@ -99,7 +99,6 @@ fn estimate_gas_gives_proper_gas_used() { Interpreter::::estimate_predicates( &mut transaction, - gas_price, ¶ms.into(), ) .expect("Should successfully estimate predicates"); diff --git a/fuel-vm/src/predicate.rs b/fuel-vm/src/predicate.rs index 3ca2673ade..d22d8366d3 100644 --- a/fuel-vm/src/predicate.rs +++ b/fuel-vm/src/predicate.rs @@ -278,7 +278,6 @@ mod tests { let result = Interpreter::::check_predicates( &tx, - zero_gas_price, &CheckPredicateParams::default(), ); diff --git a/fuel-vm/src/tests/crypto.rs b/fuel-vm/src/tests/crypto.rs index ca43a2f77d..01b7061051 100644 --- a/fuel-vm/src/tests/crypto.rs +++ b/fuel-vm/src/tests/crypto.rs @@ -230,7 +230,7 @@ async fn recover_tx_id_predicate() { // parallel version let mut tx_for_async = tx.clone(); tx_for_async - .estimate_predicates_async::(gas_price, &check_params) + .estimate_predicates_async::(&check_params) .await .expect("Should estimate predicate successfully"); @@ -240,7 +240,7 @@ async fn recover_tx_id_predicate() { } // sequential version - tx.estimate_predicates(gas_price, &check_params) + tx.estimate_predicates(&check_params) .expect("Should estimate predicate successfully"); tx.into_checked(maturity, &consensus_params, gas_price) diff --git a/fuel-vm/src/tests/predicate.rs b/fuel-vm/src/tests/predicate.rs index e528bcd2ad..62cc81b5cd 100644 --- a/fuel-vm/src/tests/predicate.rs +++ b/fuel-vm/src/tests/predicate.rs @@ -112,7 +112,7 @@ where let mut transaction = builder.finalize(); transaction - .estimate_predicates(gas_price, &ConsensusParameters::standard().into()) + .estimate_predicates(&ConsensusParameters::standard().into()) .expect("Should estiamte predicate"); let checked = transaction @@ -123,16 +123,15 @@ where let parallel_execution = { Interpreter::::check_predicates_async::( - &checked, gas_price, ¶ms, + &checked, ¶ms, ) .await .map(|checked| checked.gas_used()) }; - let seq_execution = Interpreter::::check_predicates( - &checked, gas_price, ¶ms, - ) - .map(|checked| checked.gas_used()); + let seq_execution = + Interpreter::::check_predicates(&checked, ¶ms) + .map(|checked| checked.gas_used()); match (parallel_execution, seq_execution) { (Ok(p_gas_used), Ok(s_gas_used)) => { @@ -259,7 +258,7 @@ async fn execute_gas_metered_predicates( let parallel_gas_used = { let mut async_tx = transaction.clone(); async_tx - .estimate_predicates_async::(gas_price, ¶ms) + .estimate_predicates_async::(¶ms) .await .map_err(|_| ())?; @@ -272,7 +271,7 @@ async fn execute_gas_metered_predicates( .expect("Should successfully create checked tranaction with predicate"); Interpreter::::check_predicates_async::( - &tx, gas_price, ¶ms, + &tx, ¶ms, ) .await .map(|r| r.gas_used()) @@ -280,9 +279,7 @@ async fn execute_gas_metered_predicates( }; // sequential version - transaction - .estimate_predicates(gas_price, ¶ms) - .map_err(|_| ())?; + transaction.estimate_predicates(¶ms).map_err(|_| ())?; let tx = transaction .into_checked_basic( @@ -292,10 +289,9 @@ async fn execute_gas_metered_predicates( ) .expect("Should successfully create checked tranaction with predicate"); - let seq_gas_used = - Interpreter::::check_predicates(&tx, gas_price, ¶ms) - .map(|r| r.gas_used()) - .map_err(|_| ())?; + let seq_gas_used = Interpreter::::check_predicates(&tx, ¶ms) + .map(|r| r.gas_used()) + .map_err(|_| ())?; assert_eq!(seq_gas_used, parallel_gas_used); @@ -382,14 +378,14 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { let _ = builder .clone() .finalize_checked_basic(Default::default(), gas_price) - .check_predicates_async::(gas_price, ¶ms) + .check_predicates_async::(¶ms) .await .expect("Predicate check failed even if we don't have any predicates"); } let tx_without_predicate = builder .finalize_checked_basic(Default::default(), gas_price) - .check_predicates(gas_price, ¶ms) + .check_predicates(¶ms) .expect("Predicate check failed even if we don't have any predicates"); let mut client = MemoryClient::default(); @@ -424,7 +420,7 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { let mut transaction = builder.finalize(); transaction - .estimate_predicates(gas_price, ¶ms) + .estimate_predicates(¶ms) .expect("Predicate estimation failed"); let checked = transaction @@ -439,7 +435,7 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { { let tx_with_predicate = checked .clone() - .check_predicates_async::(gas_price, ¶ms) + .check_predicates_async::(¶ms) .await .expect("Predicate check failed"); @@ -457,7 +453,7 @@ async fn gas_used_by_predicates_not_causes_out_of_gas_during_script() { } let tx_with_predicate = checked - .check_predicates(gas_price, ¶ms) + .check_predicates(¶ms) .expect("Predicate check failed"); client.transact(tx_with_predicate); @@ -510,14 +506,14 @@ async fn gas_used_by_predicates_more_than_limit() { let _ = builder .clone() .finalize_checked_basic(Default::default(), gas_price) - .check_predicates_async::(gas_price, ¶ms) + .check_predicates_async::(¶ms) .await .expect("Predicate check failed even if we don't have any predicates"); } let tx_without_predicate = builder .finalize_checked_basic(Default::default(), gas_price) - .check_predicates(gas_price, ¶ms) + .check_predicates(¶ms) .expect("Predicate check failed even if we don't have any predicates"); let mut client = MemoryClient::default(); @@ -561,7 +557,7 @@ async fn gas_used_by_predicates_more_than_limit() { let tx_with_predicate = builder .clone() .finalize_checked_basic(Default::default(), gas_price) - .check_predicates_async::(gas_price, ¶ms) + .check_predicates_async::(¶ms) .await; assert!(matches!( @@ -572,7 +568,7 @@ async fn gas_used_by_predicates_more_than_limit() { let tx_with_predicate = builder .finalize_checked_basic(Default::default(), gas_price) - .check_predicates(gas_price, ¶ms); + .check_predicates(¶ms); assert!(matches!( tx_with_predicate.unwrap_err(),