MCPcopy Create free account
hub / github.com/base/base / into_runtime_config

Method into_runtime_config

crates/execution/cli/src/node.rs:106–160  ·  view source on GitHub ↗

Converts parsed args into a chain-injected execution runtime config.

(self, chain: Arc<BaseChainSpec>)

Source from the content-addressed store, hash-verified

104impl ExecutionNodeConfigArgs {
105 /// Converts parsed args into a chain-injected execution runtime config.
106 pub fn into_runtime_config(self, chain: Arc<BaseChainSpec>) -> ExecutionNodeRuntimeConfig {
107 let Self {
108 config,
109 metrics,
110 instance,
111 with_unused_ports,
112 datadir,
113 network,
114 rpc,
115 txpool,
116 debug,
117 db,
118 dev,
119 pruning,
120 engine,
121 era,
122 static_files,
123 storage,
124 } = self;
125
126 let mut node_config = NodeConfig {
127 datadir,
128 config,
129 chain,
130 metrics,
131 instance,
132 network,
133 rpc,
134 txpool,
135 builder: Default::default(),
136 debug,
137 db,
138 dev,
139 pruning,
140 engine,
141 era,
142 static_files,
143 storage,
144 jit: Default::default(),
145 };
146
147 if node_config.network.max_inbound_peers.is_none() {
148 node_config.network.max_inbound_peers = Some(DEFAULT_BASE_MAX_INBOUND_EL_PEERS);
149 }
150
151 if node_config.network.max_outbound_peers.is_none() {
152 node_config.network.max_outbound_peers = Some(DEFAULT_BASE_MAX_OUTBOUND_EL_PEERS);
153 }
154
155 ExecutionNodeRuntimeConfig {
156 node_config,
157 with_unused_ports,
158 upgrade_signal_startup: UpgradeSignalStartupMode::ReadAndApply,
159 }
160 }
161}
162
163/// Execution node arguments shared by RPC-style binaries that provide chain selection themselves.

Calls

no outgoing calls