|
| 1 | +#![allow(clippy::too_many_arguments)] |
| 2 | + |
1 | 3 | use std::sync::Arc; |
2 | 4 |
|
3 | 5 | use alloy_consensus::{BlockHeader as _, Transaction as _}; |
@@ -153,14 +155,25 @@ pub trait TaikoAuthExtApi<T: RpcObject> { |
153 | 155 | #[method(name = "txPoolContentWithMinTip")] |
154 | 156 | async fn tx_pool_content_with_min_tip( |
155 | 157 | &self, |
156 | | - params: TxPoolContentWithMinTipParams, |
| 158 | + beneficiary: Address, |
| 159 | + base_fee: u64, |
| 160 | + block_max_gas_limit: u64, |
| 161 | + max_bytes_per_tx_list: u64, |
| 162 | + locals: Option<Vec<Address>>, |
| 163 | + max_transactions_lists: u64, |
| 164 | + min_tip: u64, |
157 | 165 | ) -> RpcResult<Vec<PreBuiltTxList<T>>>; |
158 | 166 |
|
159 | 167 | /// Returns candidate transaction lists without enforcing a tip threshold. |
160 | 168 | #[method(name = "txPoolContent")] |
161 | 169 | async fn tx_pool_content( |
162 | 170 | &self, |
163 | | - params: TxPoolContentParams, |
| 171 | + beneficiary: Address, |
| 172 | + base_fee: u64, |
| 173 | + block_max_gas_limit: u64, |
| 174 | + max_bytes_per_tx_list: u64, |
| 175 | + locals: Option<Vec<Address>>, |
| 176 | + max_transactions_lists: u64, |
164 | 177 | ) -> RpcResult<Vec<PreBuiltTxList<T>>>; |
165 | 178 | } |
166 | 179 |
|
@@ -469,25 +482,36 @@ where |
469 | 482 | /// Retrieves the transaction pool content with the given limits. |
470 | 483 | async fn tx_pool_content( |
471 | 484 | &self, |
472 | | - params: TxPoolContentParams, |
473 | | - ) -> RpcResult<Vec<PreBuiltTxList<RpcTransaction<Eth::Network>>>> { |
474 | | - self.tx_pool_content_with_min_tip(params.into()).await |
475 | | - } |
476 | | - |
477 | | - /// Retrieves the transaction pool content with the given limits and minimum tip. |
478 | | - async fn tx_pool_content_with_min_tip( |
479 | | - &self, |
480 | | - params: TxPoolContentWithMinTipParams, |
| 485 | + beneficiary: Address, |
| 486 | + base_fee: u64, |
| 487 | + block_max_gas_limit: u64, |
| 488 | + max_bytes_per_tx_list: u64, |
| 489 | + locals: Option<Vec<Address>>, |
| 490 | + max_transactions_lists: u64, |
481 | 491 | ) -> RpcResult<Vec<PreBuiltTxList<RpcTransaction<Eth::Network>>>> { |
482 | | - let TxPoolContentWithMinTipParams { |
| 492 | + self.tx_pool_content_with_min_tip( |
483 | 493 | beneficiary, |
484 | 494 | base_fee, |
485 | 495 | block_max_gas_limit, |
486 | 496 | max_bytes_per_tx_list, |
487 | 497 | locals, |
488 | 498 | max_transactions_lists, |
489 | | - min_tip, |
490 | | - } = params; |
| 499 | + 0, |
| 500 | + ) |
| 501 | + .await |
| 502 | + } |
| 503 | + |
| 504 | + /// Retrieves the transaction pool content with the given limits and minimum tip. |
| 505 | + async fn tx_pool_content_with_min_tip( |
| 506 | + &self, |
| 507 | + beneficiary: Address, |
| 508 | + base_fee: u64, |
| 509 | + block_max_gas_limit: u64, |
| 510 | + max_bytes_per_tx_list: u64, |
| 511 | + locals: Option<Vec<Address>>, |
| 512 | + max_transactions_lists: u64, |
| 513 | + min_tip: u64, |
| 514 | + ) -> RpcResult<Vec<PreBuiltTxList<RpcTransaction<Eth::Network>>>> { |
491 | 515 | if max_transactions_lists == 0 { |
492 | 516 | return Err(EthApiError::InvalidParams( |
493 | 517 | "`maxTransactionsLists` must not be `0`".to_string(), |
|
0 commit comments