summaryrefslogtreecommitdiff
path: root/node/RuntimeEnvironment.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-14 16:23:03 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-02-14 16:23:03 -0800
commit4ec7cd2760ae8e4b6502aad3400f1c4827a2cfbc (patch)
treeaa0505581f1cdb17cac12d62cfbc1679de5ec26e /node/RuntimeEnvironment.hpp
parentb0277ab904f0a5b6227ea234665e633171aa3962 (diff)
downloadinfinitytier-4ec7cd2760ae8e4b6502aad3400f1c4827a2cfbc.tar.gz
infinitytier-4ec7cd2760ae8e4b6502aad3400f1c4827a2cfbc.zip
Fix for GitHub issue #38: compute whether we are ONLINE a little differently
Diffstat (limited to 'node/RuntimeEnvironment.hpp')
-rw-r--r--node/RuntimeEnvironment.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/node/RuntimeEnvironment.hpp b/node/RuntimeEnvironment.hpp
index 05e10676..7969cc83 100644
--- a/node/RuntimeEnvironment.hpp
+++ b/node/RuntimeEnvironment.hpp
@@ -65,6 +65,7 @@ class RuntimeEnvironment
public:
RuntimeEnvironment() :
shutdownInProgress(false),
+ timeOfLastNetworkEnvironmentChange(0),
log((Logger *)0),
prng((CMWC4096 *)0),
mc((Multicaster *)0),
@@ -93,6 +94,9 @@ public:
// Indicates that we are shutting down -- this is hacky, want to factor out
volatile bool shutdownInProgress;
+ // Time network environment (e.g. fingerprint) last changed -- used to determine online-ness
+ volatile uint64_t timeOfLastNetworkEnvironmentChange;
+
/*
* Order matters a bit here. These are constructed in this order
* and then deleted in the opposite order on Node exit. The order ensures