|
|
@ -835,12 +835,12 @@ int main(int argc, char** argv) |
|
|
|
cout << "Networking disabled. To start, use netstart or pass -b or a remote host." << endl; |
|
|
|
|
|
|
|
#if ETH_JSONRPC || !ETH_TRUE |
|
|
|
shared_ptr<WebThreeStubServer> jsonrpcServer; |
|
|
|
shared_ptr<dev::WebThreeStubServer> jsonrpcServer; |
|
|
|
unique_ptr<jsonrpc::AbstractServerConnector> jsonrpcConnector; |
|
|
|
if (jsonrpc > -1) |
|
|
|
{ |
|
|
|
jsonrpcConnector = unique_ptr<jsonrpc::AbstractServerConnector>(new jsonrpc::HttpServer(jsonrpc, "", "", SensibleHttpThreads)); |
|
|
|
jsonrpcServer = shared_ptr<WebThreeStubServer>(new WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared<SimpleAccountHolder>([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector<KeyPair>(), keyManager, *gasPricer)); |
|
|
|
jsonrpcServer = shared_ptr<dev::WebThreeStubServer>(new dev::WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared<SimpleAccountHolder>([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector<KeyPair>(), keyManager, *gasPricer)); |
|
|
|
jsonrpcServer->setMiningBenefactorChanger([&](Address const& a) { beneficiary = a; }); |
|
|
|
jsonrpcServer->StartListening(); |
|
|
|
if (jsonAdmin.empty()) |
|
|
@ -996,7 +996,7 @@ int main(int argc, char** argv) |
|
|
|
if (jsonrpc < 0) |
|
|
|
jsonrpc = SensibleHttpPort; |
|
|
|
jsonrpcConnector = unique_ptr<jsonrpc::AbstractServerConnector>(new jsonrpc::HttpServer(jsonrpc, "", "", SensibleHttpThreads)); |
|
|
|
jsonrpcServer = shared_ptr<WebThreeStubServer>(new WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared<SimpleAccountHolder>([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector<KeyPair>(), keyManager, *gasPricer)); |
|
|
|
jsonrpcServer = shared_ptr<dev::WebThreeStubServer>(new dev::WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared<SimpleAccountHolder>([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector<KeyPair>(), keyManager, *gasPricer)); |
|
|
|
jsonrpcServer->setMiningBenefactorChanger([&](Address const& a) { beneficiary = a; }); |
|
|
|
jsonrpcServer->StartListening(); |
|
|
|
if (jsonAdmin.empty()) |
|
|
@ -1744,7 +1744,7 @@ int main(int argc, char** argv) |
|
|
|
JSConsole console(web3, make_shared<SimpleAccountHolder>([&](){return web3.ethereum();}, getAccountPassword, keyManager)); |
|
|
|
while (!g_exit) |
|
|
|
{ |
|
|
|
console.repl(); |
|
|
|
console.readExpression(); |
|
|
|
stopMiningAfterXBlocks(c, n, mining); |
|
|
|
} |
|
|
|
#endif |
|
|
|