| 301 | bool ExitHandler::s_shouldExit = false; |
| 302 | |
| 303 | int main(int argc, char** argv) |
| 304 | { |
| 305 | setDefaultOrCLocale(); |
| 306 | |
| 307 | // Init secp256k1 context by calling one of the functions. |
| 308 | toPublic({}); |
| 309 | |
| 310 | // Init defaults |
| 311 | Defaults::get(); |
| 312 | Ethash::init(); |
| 313 | NoProof::init(); |
| 314 | |
| 315 | #if ETH_DEBUG |
| 316 | g_logVerbosity = 4; |
| 317 | #else |
| 318 | g_logVerbosity = 1; |
| 319 | #endif |
| 320 | |
| 321 | /// Operating mode. |
| 322 | OperationMode mode = OperationMode::Node; |
| 323 | // unsigned prime = 0; |
| 324 | // bool yesIReallyKnowWhatImDoing = false; |
| 325 | strings scripts; |
| 326 | |
| 327 | /// File name for import/export. |
| 328 | string filename; |
| 329 | bool safeImport = false; |
| 330 | |
| 331 | /// Hashes/numbers for export range. |
| 332 | string exportFrom = "1"; |
| 333 | string exportTo = "latest"; |
| 334 | Format exportFormat = Format::Binary; |
| 335 | |
| 336 | /// General params for Node operation |
| 337 | NodeMode nodeMode = NodeMode::Full; |
| 338 | bool interactive = false; |
| 339 | |
| 340 | int jsonRPCURL = -1; |
| 341 | bool adminViaHttp = false; |
| 342 | bool ipc = true; |
| 343 | std::string rpcCorsDomain = ""; |
| 344 | |
| 345 | string jsonAdmin; |
| 346 | ChainParams chainParams(genesisInfo(eth::Network::MainNetwork), genesisStateRoot(eth::Network::MainNetwork)); |
| 347 | u256 gasFloor = Invalid256; |
| 348 | string privateChain; |
| 349 | |
| 350 | bool upnp = true; |
| 351 | WithExisting withExisting = WithExisting::Trust; |
| 352 | |
| 353 | /// Networking params. |
| 354 | string clientName; |
| 355 | string listenIP; |
| 356 | unsigned short listenPort = 30303; |
| 357 | string publicIP; |
| 358 | string remoteHost; |
| 359 | unsigned short remotePort = 30303; |
| 360 |
nothing calls this directly
no test coverage detected