From bcf4eee0c11004e70343e14f9b8a296bfa1eda6e Mon Sep 17 00:00:00 2001 From: "Pengfei(Andy) Zhang" Date: Thu, 31 Oct 2024 16:56:49 -0400 Subject: [PATCH] fix: fix middleware service clone. --- bin/rundler/chain_specs/opbnb_testnet.toml | 7 +++++++ bin/rundler/src/cli/chain_spec.rs | 3 ++- crates/provider/src/alloy/metrics.rs | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 bin/rundler/chain_specs/opbnb_testnet.toml diff --git a/bin/rundler/chain_specs/opbnb_testnet.toml b/bin/rundler/chain_specs/opbnb_testnet.toml new file mode 100644 index 000000000..6cddc4a09 --- /dev/null +++ b/bin/rundler/chain_specs/opbnb_testnet.toml @@ -0,0 +1,7 @@ +name = "Opbnb Testnet" +id = 5611 + +priority_fee_oracle_type = "USAGE_BASED" +min_max_priority_fee_per_gas = 30000000000 +bloxroute_enabled = true +max_transaction_size_bytes = 130000 diff --git a/bin/rundler/src/cli/chain_spec.rs b/bin/rundler/src/cli/chain_spec.rs index 9ca5a75c4..70ce7f511 100644 --- a/bin/rundler/src/cli/chain_spec.rs +++ b/bin/rundler/src/cli/chain_spec.rs @@ -123,5 +123,6 @@ define_hardcoded_chain_specs!( polygon_amoy, avax, bera_bartio, - avax_fuji + avax_fuji, + opbnb_testnet ); diff --git a/crates/provider/src/alloy/metrics.rs b/crates/provider/src/alloy/metrics.rs index 5a784b557..18650c353 100644 --- a/crates/provider/src/alloy/metrics.rs +++ b/crates/provider/src/alloy/metrics.rs @@ -88,9 +88,9 @@ where method_name.clone(), "rpc".to_string(), ); - let mut svc = self.service.clone(); + let fut = self.service.call(request); async move { - let response = svc.call(request).await; + let response = fut.await; method_logger.done(); match &response { Ok(resp) => {