diff options
| author | Russell Yanofsky <[email protected]> | 2017-03-02 12:20:34 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2017-03-03 13:51:41 -0500 |
| commit | e57a1fd8999800b3fc744d45bb96354cae294032 (patch) | |
| tree | e3c79a873e1f83eefe2f86506b87125a9c02679a /src/chain.h | |
| parent | Merge #9891: depends: make osx output deterministic (diff) | |
| download | discoin-e57a1fd8999800b3fc744d45bb96354cae294032.tar.xz discoin-e57a1fd8999800b3fc744d45bb96354cae294032.zip | |
Define 7200 second timestamp window constant
Diffstat (limited to 'src/chain.h')
| -rw-r--r-- | src/chain.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/chain.h b/src/chain.h index acb29b667..eab4d5c58 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: |