diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 10:01:25 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 10:02:05 +0100 |
commit | 5a6af317225486fb56c6758eb8ac841ee0fa5733 (patch) | |
tree | 229c6d86df111bb845f5a48138b9ba495f4f9e20 /src/chain.h | |
parent | 56ab672b59dae168a0a34c40b5ba3aa5034bbd76 (diff) | |
parent | e57a1fd8999800b3fc744d45bb96354cae294032 (diff) |
Merge #9908: Define 7200 second timestamp window constant
e57a1fd Define 7200 second timestamp window constant (Russell Yanofsky)
Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
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 4fd5aed93b..de120d2d75 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: |