From e57a1fd8999800b3fc744d45bb96354cae294032 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Thu, 2 Mar 2017 12:20:34 -0500 Subject: Define 7200 second timestamp window constant --- src/chain.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/chain.h') 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 +/** + * 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: -- cgit v1.2.3