Browse Source

Internal jsonrpc uses its own session.

Fixes #2597
cl-refactor
chriseth 10 years ago
parent
commit
ef98742820
  1. 3
      eth/main.cpp

3
eth/main.cpp

@ -1810,7 +1810,8 @@ int main(int argc, char** argv)
#if ETH_JSCONSOLE || !ETH_TRUE
JSLocalConsole console;
shared_ptr<dev::WebThreeStubServer> rpcServer = make_shared<dev::WebThreeStubServer>(*console.connector(), web3, make_shared<SimpleAccountHolder>([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector<KeyPair>(), keyManager, *gasPricer);
console.eval("web3.admin.setSessionKey('" + jsonAdmin + "')");
string sessionKey = rpcServer->newSession(SessionPermissions{{Priviledge::Admin}});
console.eval("web3.admin.setSessionKey('" + sessionKey + "')");
while (!g_exit)
{
console.readExpression();

Loading…
Cancel
Save