<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_mine.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 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 MIN_TX_FEE = 0.1 * CENT;
static const int64 MIN_RELAY_TX_FEE = 0.1 * CENT;
static const int64 MAX_MONEY = 47433600 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK = 10 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK_LEGACY = 10 * COIN;
static const int64 MAX_MINT_PROOF_OF_STAKE = 1 * CENT;
//Version 2.0
static const int64 MAX_MINT_PROOF_OF_STAKEV2 = 200 * CENT;
static const unsigned int VERSION2_SWITCH_TIME = 1404457454; // Fri, 04 Jul 2014 07:04:14 GMT

static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE;
/** Split/Combine Threshold Max */
static const int64 MAX_SPLIT_AMOUNT = 200 * COIN;
static const int64 MAX_COMBINE_AMOUNT = MAX_SPLIT_AMOUNT * 2;

static const unsigned int PROTOCOL_SWITCH_TIME = 1371686400; // 20 Jun 2013 00:00:00

static const unsigned int REWARD_SWITCH_TIME = 1369432800; // 25 May 2013 00:00:00

static const unsigned int REWARD_FIX_SWITCH_TIME = 1378512000; // 7 SEP 2013 00:00:00 GMT

static const int RECOVER_DBLSP_HEIGHT_TESTNET = 1180; // DoubleSpend Fix Testnet.
static const int RECOVER_DBLSP_HEIGHT = 3390000; // DoubleSpend Fix MainNet


inline bool MoneyRange(int64 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 hashGenesisBlockOfficial("0xb70be2c6d7f6dfbb7cc874a6009b14e267b0e0ecb2e725152dd785829216dadd");
static const uint256 hashGenesisBlockTestNet("0x0000a27997158bdcb433280d3b4ed39f3a7e6005beaf3d878ae596ce58eadf1e");

inline int64 PastDrift(int64 nTime)
{
    if (nTime > VERSION2_SWITCH_TIME)
        return nTime - 15 * 60;  // up to 15 minutes from the past
    else
        return nTime - 2 * 60 * 60;  // up to 120 minutes from the past<commit_msg>Fix max money and split<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_mine.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 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 MIN_TX_FEE = 0.1 * CENT;
static const int64 MIN_RELAY_TX_FEE = 0.1 * CENT;
static const int64 MAX_MONEY = 474336000 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK = 10 * COIN;
static const int64 MAX_MINT_PROOF_OF_WORK_LEGACY = 10 * COIN;
static const int64 MAX_MINT_PROOF_OF_STAKE = 1 * CENT;
//Version 2.0
static const int64 MAX_MINT_PROOF_OF_STAKEV2 = 200 * CENT;
static const unsigned int VERSION2_SWITCH_TIME = 1404457454; // Fri, 04 Jul 2014 07:04:14 GMT

static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE;
/** Split/Combine Threshold Max */
static const int64 MAX_SPLIT_AMOUNT = 2000 * COIN;
static const int64 MAX_COMBINE_AMOUNT = MAX_SPLIT_AMOUNT * 2;

static const unsigned int PROTOCOL_SWITCH_TIME = 1371686400; // 20 Jun 2013 00:00:00

static const unsigned int REWARD_SWITCH_TIME = 1369432800; // 25 May 2013 00:00:00

static const unsigned int REWARD_FIX_SWITCH_TIME = 1378512000; // 7 SEP 2013 00:00:00 GMT

static const int RECOVER_DBLSP_HEIGHT_TESTNET = 1180; // DoubleSpend Fix Testnet.
static const int RECOVER_DBLSP_HEIGHT = 3390000; // DoubleSpend Fix MainNet


inline bool MoneyRange(int64 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 hashGenesisBlockOfficial("0xb70be2c6d7f6dfbb7cc874a6009b14e267b0e0ecb2e725152dd785829216dadd");
static const uint256 hashGenesisBlockTestNet("0x0000a27997158bdcb433280d3b4ed39f3a7e6005beaf3d878ae596ce58eadf1e");

inline int64 PastDrift(int64 nTime)
{
    if (nTime > VERSION2_SWITCH_TIME)
        return nTime - 15 * 60;  // up to 15 minutes from the past
    else
        return nTime - 2 * 60 * 60;  // up to 120 minutes from the past
{'fraction_non_alphanumeric': 0.07442680776014109, 'fraction_numerical': 0.10864197530864197, 'mean_word_length': 5.078242229367631, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '556054', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2026, 'n_words': 609}