<commit_before>// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_MAIN_H
#define BITCOIN_MAIN_H

#include "bignum.h"
#include "sync.h"
#include "net.h"
#include "script.h"
#include "scrypt.h"
#include "hashblock.h"

#include <list>

class CWallet;
class CBlock;
class CBlockIndex;
class CKeyItem;
class CReserveKey;
class COutPoint;

class CAddress;
class CInv;
class CRequestTracker;
class CNode;

static const int LAST_POW_BLOCK = 160000; // at 30 second blocks will be about 30 days from launch

static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const int64_t MIN_TX_FEE = 10000;
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
static const int64_t MAX_MONEY = 60000000 * COIN;
static const int64_t COIN_YEAR_REWARD = 1 * CENT; // 1% per year
static const int64_t MAX_MINT_PROOF_OF_STAKE = 0.1 * COIN;	// 10% annual interest

#define FOUNDATION "sZD2Tv6HpfT1q3aHKRUHopy1T6Ge8UYLtZ"
#define FOUNDATION_TEST "sZD2Tv6HpfT1q3aHKRUHopy1T6Ge8UYLtZ"

inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC

#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif

static const uint256 hashGenesisBlock("00000729be7c186c90758ebeb55f9f947ee3f1d856b5d136d5796b4a5a704a59");
static const uint256 hashGenesisBlockTestNet("00000729be7c186c90758ebeb55f9f947ee3f1d856b5d136d5796b4a5a704a59");

static const uint256 CheckBlock1 ("0000003e263eae6f4176c5888962e60b9f9e7c3e1d945d40cc8f7d2454d1dff5"); // Checkpoint at block 1
static const uint256 CheckBlock2 ("0000008595b56dfc05b26d073ce9e86bf5b7c4e4eb0e1f97beecde38b759890a"); // Checkpoint at block 2
static const uint256 CheckBlock3 ("00000069ada990305c02b3807640126e93a88680fbe89201d673ebb4e26a22c7"); // Checkpoint at block 3
static const uint256 CheckBlock4 ("000000b2c8845f757395db92f1b347f73727edba630339c44b6cb8625f87cd9b"); // Checkpoint at block 4
static const uint256 CheckBlock5 ("0000000007054bf10c8fca005b92c253d3c31323c1273057194dd4b21c9ca9c6"); // Checkpoint at block 25000
static const uint256 CheckBlock6 ("000000000480b6932ccfa26fb4acee44943ab081730e98b55c29ae07377e94bb"); // Checkpoint at block 50000
static const uint256 CheckBlock7 ("0000000022dd29280a0e1d7aec75c8f9f86e28a54a551d2f210934c815873b81"); // Checkpoint at block 100000
static const uint256 CheckBlock8 ("3e004a1b0399ef61a29c84d7760a5c36446c971f5a3e4dfb802da1c216a3ac3a"); // Checkpoint at block 117985
static const uint256 CheckBlock9 ("7f735b89ca46c056a347fba6d8d4978c491d53de0e50f05020e980572b8b1c97"); // Checkpoint at block 135000
static const uint256 CheckBlock10 ("00000000167beb4925ba3eea445c6ee36f530ce9b320bc20ae421394ae8afefe"); // Checkpoint at block 141296
static const uint256 CheckBlock11 ("000001206c1b30d69ab8126e8aee557855ff0fc1f00b62f948180c2faaf32667"); // Checkpoint at block 141300
static const uint256 CheckBlock12 ("0000001ca34381fc5d3897cd338b0a91f8a10345d688e457a184088e6bc6a366"); // Checkpoint at block 141310
static const uint256 CheckBlock13 ("00000052473a7a0bf0073481dbbd81ea7b0c2faee6c5623a4907bd1fbc8331ba"); // Checkpoint at block 141320
static const uint256 CheckBlock14 ("0000000b3bbc6ff2baccfe8377a221df5815a94e2383755c4180fe71e9dbcea6"); // Checkpoint at block 141330
static const uint256 CheckBlock15 ("000000056e60e91f1d4c5c39b053c6099acd81e65f5d0a825c69ee07bc59c831"); // Checkpoint at block 141340
static const uint256 CheckBlock16 ("00000007c4afb4073bdd7f1fe3b80ef03703e35dbe7a0e5cdc0d428217a14835"); // Checkpoint at block 141350
static const uint256 CheckBlock17 ("0000001874306dc4ee34624e63ca5693bcd3f0817b6247bb2e0a71d5acaf30ae"); // Checkpoint at block 141351
static const uint256 CheckBlock18 ("000000008d1c60ce7a50ba153a5d3f91e436c6c8a75f20a1bbdbe91cedbc4d05"); // Checkpoint at block 141352
static const uint256 CheckBlock19 ("000000157f70ca2b7d888640c98ccb4e931f26d1e969af01a686f2bea1c1885b"); // Checkpoint at block 141353
static const uint256 CheckBlock20 ("0000000e345042b49353d387d7021c13b6a0d59f7674edf603e9933342fc1877"); // Checkpoint at block 141360
static const uint256 CheckBlock21 ("00000002423353dd38d0b21c1b513f50d88c794d450f58158ad6bf93083ad2b8"); // Checkpoint at block 141370
static const uint256 CheckBlock22 ("000000020670eb25cdfef7b3cd3ef80f7eeae8343adf56ea262a9e5e4c0a0b78"); // Checkpoint at block 141380
static const uint256 CheckBlock23 ("000000050a93b81bb6956e3a47f84243c34ac8a2d4063db7c98d60a39d0c4af4"); // Checkpoint at block 141390
static const uint256 CheckBlock24 ("000000026bdb8db7d635838f37c7d0694bdf381ee04aaec49bfa19e8105c288c"); // Checkpoint at block 141400
static const uint256 CheckBlock25 ("00000003a8491403dd8f9e50d61f708c94a4d247e052b896694e6100cc705387"); // Checkpoint at block 150000
static const uint256 CheckBlock26 ("ceabbb5036d3ad9186db38b04a2ff3b1cf2e2473bd72b848d5175c4645a87a76"); // Checkpoint at block 160000
static const uint256 CheckBlock27 ("26bc88c34d0f70ea1b68b75beffcb45ccb66285773c67f75988e9c15f06dd935"); // Checkpoint at block 170000
static const uint256 CheckBlock28 ("0af905fed32c81845ec518d75cd67f76f0f21237dd391fec3e07231c0b27b797"); // Checkpoint at block 180000
static const uint256 CheckBlock29 ("e0d9002d503ca284bed9ab9190758187f5826693b8c4ceb6045bde3b326f7407"); // Checkpoint at block 190000
static const uint256 CheckBlock30 ("99fa06ca9ae93f5ff40bc5240de62967a7888adefe907d2b229d09d05c9c5946"); // Checkpoint at block 200000
static const uint256 CheckBlock31 ("7ceddca8ed9dd7ad5f98870dcd6f2c9fcfa90ed1b684a58c042dd081b91487eb"); // Checkpoint at block 210000
static const uint256 CheckBlock32 ("42d8c73e295bc58f0d6457739f751c6fdb7b066fc27404eafbfd31c9d84943bd"); // Checkpoint at block 220000
static const uint256 CheckBlock33 ("4b3a964cb7daefed14cef75dcd1728fb5e45d121abe60a24fae241b4cc75fa57"); // Checkpoint at block 221000
static const uint256 CheckBlock34 ("75da191e75dd985446d4e0dc28211711ec055a38e8a9fb6491c83190b1bdfd1a"); // Checkpoint at block 222000
static const uint256 CheckBlock35 ("eb8c232317e6a2f76a8358bf917076c40b5f9a70fb3de34f1e2b17605d24b879"); // Checkpoint at block 224176
static const uint256 CheckBlock36 ("856573b88e592d4eb4eb75d690e80bd7ce179d9da1cf6a185495385bb57901c4"); // Checkpoint at block 419892
static const uint256 CheckBlock37 ("93ed73ab6dbe7410fb107c939f0380864f9a4891f36522bd1f0c7ee6f3565c40"); // Checkpoint at block 681958

inline int64_t PastDrift(int64_t nTime)   { return nTime - 10 * 60; } // up to 10 minutes from the past
inline int64_t FutureDrift(int64_t nTime) { return nTime + 10 * 60; } // up to 10 minutes from the future

extern int64_t devCoin;
extern CScript COINBASE_FLAGS;<commit_msg>Slight TimeDrift Modification to Fix Sync Issues from Block Zero - This was contributed by and Special Thanks to Remy_5<commit_after>// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_MAIN_H
#define BITCOIN_MAIN_H

#include "bignum.h"
#include "sync.h"
#include "net.h"
#include "script.h"
#include "scrypt.h"
#include "hashblock.h"

#include <list>

class CWallet;
class CBlock;
class CBlockIndex;
class CKeyItem;
class CReserveKey;
class COutPoint;

class CAddress;
class CInv;
class CRequestTracker;
class CNode;

static const int LAST_POW_BLOCK = 160000; // at 30 second blocks will be about 30 days from launch

static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const int64_t MIN_TX_FEE = 10000;
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
static const int64_t MAX_MONEY = 60000000 * COIN;
static const int64_t COIN_YEAR_REWARD = 1 * CENT; // 1% per year
static const int64_t MAX_MINT_PROOF_OF_STAKE = 0.1 * COIN;	// 10% annual interest

#define FOUNDATION "sZD2Tv6HpfT1q3aHKRUHopy1T6Ge8UYLtZ"
#define FOUNDATION_TEST "sZD2Tv6HpfT1q3aHKRUHopy1T6Ge8UYLtZ"

inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC

#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif

static const uint256 hashGenesisBlock("00000729be7c186c90758ebeb55f9f947ee3f1d856b5d136d5796b4a5a704a59");
static const uint256 hashGenesisBlockTestNet("00000729be7c186c90758ebeb55f9f947ee3f1d856b5d136d5796b4a5a704a59");

static const uint256 CheckBlock1 ("0000003e263eae6f4176c5888962e60b9f9e7c3e1d945d40cc8f7d2454d1dff5"); // Checkpoint at block 1
static const uint256 CheckBlock2 ("0000008595b56dfc05b26d073ce9e86bf5b7c4e4eb0e1f97beecde38b759890a"); // Checkpoint at block 2
static const uint256 CheckBlock3 ("00000069ada990305c02b3807640126e93a88680fbe89201d673ebb4e26a22c7"); // Checkpoint at block 3
static const uint256 CheckBlock4 ("000000b2c8845f757395db92f1b347f73727edba630339c44b6cb8625f87cd9b"); // Checkpoint at block 4
static const uint256 CheckBlock5 ("0000000007054bf10c8fca005b92c253d3c31323c1273057194dd4b21c9ca9c6"); // Checkpoint at block 25000
static const uint256 CheckBlock6 ("000000000480b6932ccfa26fb4acee44943ab081730e98b55c29ae07377e94bb"); // Checkpoint at block 50000
static const uint256 CheckBlock7 ("0000000022dd29280a0e1d7aec75c8f9f86e28a54a551d2f210934c815873b81"); // Checkpoint at block 100000
static const uint256 CheckBlock8 ("3e004a1b0399ef61a29c84d7760a5c36446c971f5a3e4dfb802da1c216a3ac3a"); // Checkpoint at block 117985
static const uint256 CheckBlock9 ("7f735b89ca46c056a347fba6d8d4978c491d53de0e50f05020e980572b8b1c97"); // Checkpoint at block 135000
static const uint256 CheckBlock10 ("00000000167beb4925ba3eea445c6ee36f530ce9b320bc20ae421394ae8afefe"); // Checkpoint at block 141296
static const uint256 CheckBlock11 ("000001206c1b30d69ab8126e8aee557855ff0fc1f00b62f948180c2faaf32667"); // Checkpoint at block 141300
static const uint256 CheckBlock12 ("0000001ca34381fc5d3897cd338b0a91f8a10345d688e457a184088e6bc6a366"); // Checkpoint at block 141310
static const uint256 CheckBlock13 ("00000052473a7a0bf0073481dbbd81ea7b0c2faee6c5623a4907bd1fbc8331ba"); // Checkpoint at block 141320
static const uint256 CheckBlock14 ("0000000b3bbc6ff2baccfe8377a221df5815a94e2383755c4180fe71e9dbcea6"); // Checkpoint at block 141330
static const uint256 CheckBlock15 ("000000056e60e91f1d4c5c39b053c6099acd81e65f5d0a825c69ee07bc59c831"); // Checkpoint at block 141340
static const uint256 CheckBlock16 ("00000007c4afb4073bdd7f1fe3b80ef03703e35dbe7a0e5cdc0d428217a14835"); // Checkpoint at block 141350
static const uint256 CheckBlock17 ("0000001874306dc4ee34624e63ca5693bcd3f0817b6247bb2e0a71d5acaf30ae"); // Checkpoint at block 141351
static const uint256 CheckBlock18 ("000000008d1c60ce7a50ba153a5d3f91e436c6c8a75f20a1bbdbe91cedbc4d05"); // Checkpoint at block 141352
static const uint256 CheckBlock19 ("000000157f70ca2b7d888640c98ccb4e931f26d1e969af01a686f2bea1c1885b"); // Checkpoint at block 141353
static const uint256 CheckBlock20 ("0000000e345042b49353d387d7021c13b6a0d59f7674edf603e9933342fc1877"); // Checkpoint at block 141360
static const uint256 CheckBlock21 ("00000002423353dd38d0b21c1b513f50d88c794d450f58158ad6bf93083ad2b8"); // Checkpoint at block 141370
static const uint256 CheckBlock22 ("000000020670eb25cdfef7b3cd3ef80f7eeae8343adf56ea262a9e5e4c0a0b78"); // Checkpoint at block 141380
static const uint256 CheckBlock23 ("000000050a93b81bb6956e3a47f84243c34ac8a2d4063db7c98d60a39d0c4af4"); // Checkpoint at block 141390
static const uint256 CheckBlock24 ("000000026bdb8db7d635838f37c7d0694bdf381ee04aaec49bfa19e8105c288c"); // Checkpoint at block 141400
static const uint256 CheckBlock25 ("00000003a8491403dd8f9e50d61f708c94a4d247e052b896694e6100cc705387"); // Checkpoint at block 150000
static const uint256 CheckBlock26 ("ceabbb5036d3ad9186db38b04a2ff3b1cf2e2473bd72b848d5175c4645a87a76"); // Checkpoint at block 160000
static const uint256 CheckBlock27 ("26bc88c34d0f70ea1b68b75beffcb45ccb66285773c67f75988e9c15f06dd935"); // Checkpoint at block 170000
static const uint256 CheckBlock28 ("0af905fed32c81845ec518d75cd67f76f0f21237dd391fec3e07231c0b27b797"); // Checkpoint at block 180000
static const uint256 CheckBlock29 ("e0d9002d503ca284bed9ab9190758187f5826693b8c4ceb6045bde3b326f7407"); // Checkpoint at block 190000
static const uint256 CheckBlock30 ("99fa06ca9ae93f5ff40bc5240de62967a7888adefe907d2b229d09d05c9c5946"); // Checkpoint at block 200000
static const uint256 CheckBlock31 ("7ceddca8ed9dd7ad5f98870dcd6f2c9fcfa90ed1b684a58c042dd081b91487eb"); // Checkpoint at block 210000
static const uint256 CheckBlock32 ("42d8c73e295bc58f0d6457739f751c6fdb7b066fc27404eafbfd31c9d84943bd"); // Checkpoint at block 220000
static const uint256 CheckBlock33 ("4b3a964cb7daefed14cef75dcd1728fb5e45d121abe60a24fae241b4cc75fa57"); // Checkpoint at block 221000
static const uint256 CheckBlock34 ("75da191e75dd985446d4e0dc28211711ec055a38e8a9fb6491c83190b1bdfd1a"); // Checkpoint at block 222000
static const uint256 CheckBlock35 ("eb8c232317e6a2f76a8358bf917076c40b5f9a70fb3de34f1e2b17605d24b879"); // Checkpoint at block 224176
static const uint256 CheckBlock36 ("856573b88e592d4eb4eb75d690e80bd7ce179d9da1cf6a185495385bb57901c4"); // Checkpoint at block 419892
static const uint256 CheckBlock37 ("93ed73ab6dbe7410fb107c939f0380864f9a4891f36522bd1f0c7ee6f3565c40"); // Checkpoint at block 681958

inline int64_t PastDrift(int64_t nTime)   { return nTime - (nBestHeight < 681958 ? 24*60*60 : 10 * 60) ; } // up to (24H or) 10 minutes from the past    **em52
inline int64_t FutureDrift(int64_t nTime) { return nTime + (nBestHeight < 681958 ? 24*60*60 : 10 * 60) ; } // up to (24H or) 10 minutes from the future  ** em52

extern int64_t devCoin;
extern CScript COINBASE_FLAGS;
{'fraction_non_alphanumeric': 0.0606950228715778, 'fraction_numerical': 0.29323410937393324, 'mean_word_length': 8.030826140567202, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 32, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6130888', 'n_tokens_mistral': 8171, 'n_tokens_neox': 5784, 'n_words': 1181}