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.
5 #ifndef ZCASH_DEPRECATION_H
6 #define ZCASH_DEPRECATION_H
9 // * Shut down 16 weeks' worth of blocks after the estimated release block height.
10 // * A warning is shown during the 2 weeks' worth of blocks prior to shut down.
11 static const int APPROX_RELEASE_HEIGHT = 249000;
12 static const int WEEKS_UNTIL_DEPRECATION = 16;
13 static const int DEPRECATION_HEIGHT = APPROX_RELEASE_HEIGHT + (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 24);
15 // Number of blocks before deprecation to warn users
16 static const int DEPRECATION_WARN_LIMIT = 14 * 24 * 24; // 2 weeks
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
21 * the current client version).
23 void EnforceNodeDeprecation(int nHeight, bool forceLogging=false);
25 #endif // ZCASH_DEPRECATION_H