Skip to content

Commit 4290314

Browse files
committed
Remove test_fibonacci_large_value_runs_out_of_gas (moved to dry-run-limit branch)
1 parent 2257634 commit 4290314

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

substrate/frame/revive/rpc/src/tests.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ async fn run_all_eth_rpc_tests() -> anyhow::Result<()> {
285285

286286
run_tests!(
287287
test_fibonacci_call_via_runtime_api,
288-
test_fibonacci_large_value_runs_out_of_gas,
289288
test_transfer,
290289
test_deploy_and_call,
291290
test_runtime_api_dry_run_addr_works,
@@ -793,34 +792,6 @@ async fn test_runtime_pallets_address_upload_code(client: Arc<WsClient>) -> anyh
793792
Ok(())
794793
}
795794

796-
async fn test_fibonacci_large_value_runs_out_of_gas(client: Arc<WsClient>) -> anyhow::Result<()> {
797-
use pallet_revive::precompiles::alloy::sol_types::SolCall;
798-
use pallet_revive_fixtures::Fibonacci;
799-
800-
let (bytes, _) = pallet_revive_fixtures::compile_module_with_type(
801-
"Fibonacci",
802-
pallet_revive_fixtures::FixtureType::Solc,
803-
)?;
804-
805-
let account = Account::default();
806-
let nonce = client.get_transaction_count(account.address(), BlockTag::Latest.into()).await?;
807-
let tx = TransactionBuilder::new(&client).input(bytes.to_vec()).send().await?;
808-
let receipt = tx.wait_for_receipt().await?;
809-
let contract_address = create1(&account.address(), nonce.try_into().unwrap());
810-
assert_eq!(Some(contract_address), receipt.contract_address);
811-
812-
let result = TransactionBuilder::new(&client)
813-
.to(contract_address)
814-
.input(Fibonacci::fibCall { n: 100u64 }.abi_encode())
815-
.eth_call()
816-
.await;
817-
818-
let err = result.expect_err("fib(100) should run out of gas");
819-
assert!(err.to_string().contains("OutOfGas"), "expected OutOfGas error, got: {err}");
820-
821-
Ok(())
822-
}
823-
824795
/// Test that deploys and calls the Fibonacci contract via Substrate APIs works
825796
async fn test_fibonacci_call_via_runtime_api(_client: Arc<WsClient>) -> anyhow::Result<()> {
826797
use pallet_revive::precompiles::alloy::sol_types::SolCall;

0 commit comments

Comments
 (0)