diff --git a/eth/main.cpp b/eth/main.cpp index 540cb8c4c..912de3245 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -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 jsonrpcServer; + shared_ptr jsonrpcServer; unique_ptr jsonrpcConnector; if (jsonrpc > -1) { jsonrpcConnector = unique_ptr(new jsonrpc::HttpServer(jsonrpc, "", "", SensibleHttpThreads)); - jsonrpcServer = shared_ptr(new WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector(), keyManager, *gasPricer)); + jsonrpcServer = shared_ptr(new dev::WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector(), 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(new jsonrpc::HttpServer(jsonrpc, "", "", SensibleHttpThreads)); - jsonrpcServer = shared_ptr(new WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector(), keyManager, *gasPricer)); + jsonrpcServer = shared_ptr(new dev::WebThreeStubServer(*jsonrpcConnector.get(), web3, make_shared([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector(), 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([&](){return web3.ethereum();}, getAccountPassword, keyManager)); while (!g_exit) { - console.repl(); + console.readExpression(); stopMiningAfterXBlocks(c, n, mining); } #endif diff --git a/libethcore/Common.h b/libethcore/Common.h index 6f23cb0e8..18b7074b7 100644 --- a/libethcore/Common.h +++ b/libethcore/Common.h @@ -47,7 +47,8 @@ extern const unsigned c_databaseVersion; enum class Network { Olympic = 0, - Frontier = 1 + Frontier = 1, + Turbo = 2 }; extern const Network c_network; diff --git a/libethcore/Params.cpp b/libethcore/Params.cpp index 916adf6ca..0fea39b30 100644 --- a/libethcore/Params.cpp +++ b/libethcore/Params.cpp @@ -31,12 +31,12 @@ namespace eth //--- BEGIN: AUTOGENERATED FROM github.com/ethereum/common/params.json u256 const c_genesisDifficulty = 131072; u256 const c_maximumExtraDataSize = 1024; -u256 const c_genesisGasLimit = 3141592; -u256 const c_minGasLimit = 125000; +u256 const c_genesisGasLimit = c_network == Network::Turbo ? 100000000 : 3141592; +u256 const c_minGasLimit = c_network == Network::Turbo ? 100000000 : 125000; u256 const c_gasLimitBoundDivisor = 1024; u256 const c_minimumDifficulty = 131072; u256 const c_difficultyBoundDivisor = 2048; -u256 const c_durationLimit = c_network == Network::Olympic ? 8 : 12; +u256 const c_durationLimit = c_network == Network::Turbo ? 2 : c_network == Network::Olympic ? 8 : 12; //--- END: AUTOGENERATED FROM /feeStructure.json } diff --git a/libjsconsole/JSConsole.cpp b/libjsconsole/JSConsole.cpp index d1f7c0264..29d547242 100644 --- a/libjsconsole/JSConsole.cpp +++ b/libjsconsole/JSConsole.cpp @@ -39,12 +39,11 @@ JSConsole::JSConsole(WebThreeDirect& _web3, shared_ptr const& _ac m_printer(m_engine) { m_jsonrpcConnector.reset(new JSV8Connector(m_engine)); - m_jsonrpcServer.reset(new WebThreeStubServer(*m_jsonrpcConnector.get(), _web3, _accounts, vector())); + (void)_web3; (void)_accounts; +// m_jsonrpcServer.reset(new WebThreeStubServer(*m_jsonrpcConnector.get(), _web3, _accounts, vector())); } -JSConsole::~JSConsole() {} - -void JSConsole::repl() const +void JSConsole::readExpression() const { string cmd = ""; g_logPost = [](std::string const& a, char const*) { cout << "\r \r" << a << endl << flush; rl_forced_update_display(); }; diff --git a/libjsconsole/JSConsole.h b/libjsconsole/JSConsole.h index b7aded4f3..2e5144a5d 100644 --- a/libjsconsole/JSConsole.h +++ b/libjsconsole/JSConsole.h @@ -25,7 +25,7 @@ #include #include -class WebThreeStubServer; +namespace dev { class WebThreeStubServer; } namespace jsonrpc { class AbstractServerConnector; } namespace dev @@ -39,15 +39,14 @@ class JSConsole { public: JSConsole(WebThreeDirect& _web3, std::shared_ptr const& _accounts); - ~JSConsole(); - void repl() const; + void readExpression() const; private: std::string promptForIndentionLevel(int _i) const; JSV8Engine m_engine; JSV8Printer m_printer; - std::unique_ptr m_jsonrpcServer; + std::unique_ptr m_jsonrpcServer; std::unique_ptr m_jsonrpcConnector; };