aboutsummaryrefslogtreecommitdiff
path: root/src/chain.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-03-02 12:20:34 -0500
committerRussell Yanofsky <russ@yanofsky.org>2017-03-03 13:51:41 -0500
commite57a1fd8999800b3fc744d45bb96354cae294032 (patch)
treee3c79a873e1f83eefe2f86506b87125a9c02679a /src/chain.h
parent3fabae742567ecc060618c23d5fc01518fe96e60 (diff)
Define 7200 second timestamp window constant
Diffstat (limited to 'src/chain.h')
-rw-r--r--src/chain.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/chain.h b/src/chain.h
index acb29b667b..eab4d5c58a 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -14,6 +14,20 @@
#include <vector>
+/**
+ * Maximum amount of time that a block timestamp is allowed to exceed the
+ * current network-adjusted time before the block will be accepted.
+ */
+static const int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
+
+/**
+ * Timestamp window used as a grace period by code that compares external
+ * timestamps (such as timestamps passed to RPCs, or wallet key creation times)
+ * to block timestamps. This should be set at least as high as
+ * MAX_FUTURE_BLOCK_TIME.
+ */
+static const int64_t TIMESTAMP_WINDOW = MAX_FUTURE_BLOCK_TIME;
+
class CBlockFileInfo
{
public: