Returns the components for the given [`RollupArgs`].
(&self)
| 239 | |
| 240 | /// Returns the components for the given [`RollupArgs`]. |
| 241 | pub fn components<Node>(&self) -> BaseNodeComponentBuilder<Node> |
| 242 | where |
| 243 | Node: FullNodeTypes<Types: BaseNodeTypes>, |
| 244 | { |
| 245 | let RollupArgs { |
| 246 | disable_txpool_gossip, |
| 247 | compute_pending_block, |
| 248 | discovery_v4, |
| 249 | txpool_ordering, |
| 250 | max_inflight_delegated_slots, |
| 251 | .. |
| 252 | } = self.args; |
| 253 | let ordering = match txpool_ordering { |
| 254 | TxpoolOrdering::CoinbaseTip => BaseOrdering::coinbase_tip(), |
| 255 | TxpoolOrdering::Timestamp => BaseOrdering::timestamp(), |
| 256 | }; |
| 257 | ComponentsBuilder::default() |
| 258 | .node_types::<Node>() |
| 259 | .executor(BaseExecutorBuilder::default()) |
| 260 | .pool( |
| 261 | BasePoolBuilder::default() |
| 262 | .with_ordering(ordering) |
| 263 | .with_max_inflight_delegated_slots(max_inflight_delegated_slots), |
| 264 | ) |
| 265 | .payload(BasicPayloadServiceBuilder::new( |
| 266 | BasePayloadBuilder::new(compute_pending_block) |
| 267 | .with_da_config(self.da_config.clone()) |
| 268 | .with_gas_limit_config(self.gas_limit_config.clone()), |
| 269 | )) |
| 270 | .network(BaseNetworkBuilder::new(disable_txpool_gossip, !discovery_v4)) |
| 271 | .consensus(BaseConsensusBuilder::default()) |
| 272 | } |
| 273 | |
| 274 | /// Returns [`BaseAddOnsBuilder`] with configured arguments. |
| 275 | pub fn add_ons_builder<NetworkT: RpcTypes>(&self) -> BaseAddOnsBuilder<NetworkT> { |