forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdminUtils.cpp
More file actions
38 lines (33 loc) · 733 Bytes
/
Copy pathAdminUtils.cpp
File metadata and controls
38 lines (33 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <jsonrpccpp/common/exception.h>
#include <libdevcore/Log.h>
#include <libethereum/Client.h>
#include "SessionManager.h"
#include "AdminUtils.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
using namespace dev::rpc;
AdminUtils::AdminUtils(SessionManager& _sm, SystemManager* _systemManager):
m_sm(_sm),
m_systemManager(_systemManager)
{}
bool AdminUtils::admin_setVerbosity(int _v, std::string const& _session)
{
RPC_ADMIN;
return admin_verbosity(_v);
}
bool AdminUtils::admin_verbosity(int _v)
{
g_logVerbosity = _v;
return true;
}
bool AdminUtils::admin_exit(std::string const& _session)
{
RPC_ADMIN;
if (m_systemManager)
{
m_systemManager->exit();
return true;
}
return false;
}