]>
Commit | Line | Data |
---|---|---|
5b3bc971 JG |
1 | // Copyright (c) 2017 The Zcash developers |
2 | // Distributed under the MIT software license, see the accompanying | |
3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
4 | ||
5 | #ifndef ZCASH_DEPRECATION_H | |
6 | #define ZCASH_DEPRECATION_H | |
7 | ||
d6252a94 | 8 | // Deprecation policy: |
8d487e52 | 9 | // * Shut down WEEKS_UNTIL_DEPRECATION weeks' worth of blocks after the estimated release block height. |
86131275 | 10 | // * A warning is shown during the DEPRECATION_WARN_LIMIT worth of blocks prior to shut down. |
11 | static const int WEEKS_UNTIL_DEPRECATION = 52; | |
12 | static const int DEPRECATION_HEIGHT = 1400000; | |
13 | static const int APPROX_RELEASE_HEIGHT = DEPRECATION_HEIGHT - (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 60); | |
5b3bc971 JG |
14 | |
15 | // Number of blocks before deprecation to warn users | |
86131275 | 16 | static const int DEPRECATION_WARN_LIMIT = 60 * 24 * 60; // 2 months |
5b3bc971 JG |
17 | |
18 | /** | |
19 | * Checks whether the node is deprecated based on the current block height, and | |
20 | * shuts down the node with an error if so (and deprecation is not disabled for | |
7b4d0c77 JG |
21 | * the current client version). Warning and error messages are sent to the debug |
22 | * log, the metrics UI, and (if configured) -alertnofity. | |
23 | * | |
24 | * fThread means run -alertnotify in a free-running thread. | |
5b3bc971 | 25 | */ |
7b4d0c77 | 26 | void EnforceNodeDeprecation(int nHeight, bool forceLogging=false, bool fThread=true); |
5b3bc971 JG |
27 | |
28 | #endif // ZCASH_DEPRECATION_H |