- context.base = base;
- context.mCurrBlock.set_height(0);
-
- // ZMQ protocol
- createListener(base, context.xpmclientListenPort, frontendProc, &context.mainSocket, &context);
- createListener(base, context.xpmclientWorkPort, mainProc, 0, &context);
- createListener(base, context.xpmclientWorkPort+1, signalsProc, 0, &context);
-
- // Stratum protocol
- context.sessionId = 0;
- createListener(base, 3357, stratumProc, 0, &context);
- coroutineCall(coroutineNew(stratumStatsProc, &context, 0x10000));
-
- context.client =
- p2pNode::createClient(base,
- &backendConfig.peers[0],
- backendConfig.peers.size(),
- backendConfig.walletAppName.c_str());
-
- context.client->setSignalHandler(signalHandler, &context);
-