aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJon Lund Steffensen <[email protected]>2013-03-26 02:38:24 +0100
committerLuke Dashjr <[email protected]>2016-10-24 10:23:58 +0000
commite38993bb36801d492cad87479b8473794f19c9da (patch)
tree805ddc37482556fac351fa2a9e20d0e93219ef2b /src/net.h
parentAllow network activity to be temporarily suspended. (diff)
downloaddiscoin-e38993bb36801d492cad87479b8473794f19c9da.tar.xz
discoin-e38993bb36801d492cad87479b8473794f19c9da.zip
RPC: Add "togglenetwork" method to toggle network activity temporarily
RPC command "togglenetwork" toggles network and returns new state after command. RPC command "getinfo" returns "networkactive" field in output.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 6912c0f97..1d911664f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -131,6 +131,7 @@ public:
bool Start(boost::thread_group& threadGroup, CScheduler& scheduler, std::string& strNodeError, Options options);
void Stop();
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
+ bool GetNetworkActive() const { return fNetworkActive; };
void SetNetworkActive(bool active);
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false);
bool CheckIncomingNonce(uint64_t nonce);