From de6ea0dc5c2e7ef917700401813619dce116e8c9 Mon Sep 17 00:00:00 2001 From: barrystyle Date: Thu, 18 Jul 2019 06:48:43 +0800 Subject: [PATCH 1/2] Squashed proof of stake commits (initial set): 61604537f58ed2165268a07f6a5bf77470361cb4 4850537fdf2b0c6e87722a7c2262c2da210f2574 17e8d4ef606935421962c19a33504d3ccd27c669 89844c26031f0d066f1b0921d3e6837dac6cdac8 c7881e59630585f1f7b71c6fadfa10e928f1954f --- configure.ac | 2 +- src/Makefile.am | 16 +- src/Makefile.qt.include | 4 +- src/blocksigner.cpp | 83 +++++ src/blocksigner.h | 13 + src/chain.cpp | 52 +++ src/chain.h | 99 +++++- src/chainparams.cpp | 87 +++-- src/chainparams.h | 2 + src/chainparamsseeds.h | 310 ----------------- src/coins.cpp | 13 +- src/coins.h | 68 +++- src/compat.h | 11 + src/compressor.h | 7 + src/consensus/consensus.h | 2 +- src/consensus/params.h | 9 + src/init.cpp | 4 + src/kernel.cpp | 410 ++++++++++++++++++++++ src/kernel.h | 49 +++ src/masternode-payments.cpp | 7 +- src/masternode-payments.h | 8 +- src/miner.cpp | 273 ++++++++++++++- src/miner.h | 11 +- src/pow.cpp | 197 ++++++++--- src/pow.h | 6 +- src/primitives/block.cpp | 10 + src/primitives/block.h | 21 +- src/primitives/transaction.h | 17 + src/qt/askpassphrasedialog.cpp | 7 +- src/qt/askpassphrasedialog.h | 1 + src/qt/bitcoingui.cpp | 34 +- src/qt/bitcoingui.h | 7 + src/qt/dash.qrc | 4 + src/qt/forms/askpassphrasedialog.ui | 72 ++++ src/qt/res/icons/staking_active.png | Bin 0 -> 1143 bytes src/qt/res/icons/staking_inactive.png | Bin 0 -> 1004 bytes src/qt/transactionrecord.cpp | 40 ++- src/qt/transactionrecord.h | 4 +- src/qt/transactiontablemodel.cpp | 8 + src/qt/transactionview.cpp | 2 + src/qt/walletmodel.h | 7 +- src/qt/walletview.cpp | 2 +- src/rpc/client.cpp | 1 + src/rpc/mining.cpp | 10 +- src/rpc/misc.cpp | 44 +++ src/rpc/rpcevo.cpp | 2 +- src/script/dashconsensus.cpp | 2 +- src/script/interpreter.cpp | 36 +- src/script/interpreter.h | 10 +- src/script/sigcache.h | 1 + src/serialize.h | 24 +- src/span.h | 40 +++ src/streams.h | 49 ++- src/txdb.cpp | 43 ++- src/txmempool.cpp | 2 +- src/util.cpp | 13 + src/util.h | 1 + src/validation.cpp | 466 ++++++++++++++++++++------ src/validation.h | 3 + src/validationinterface.h | 4 +- src/wallet/wallet.cpp | 224 ++++++++++++- src/wallet/wallet.h | 23 +- src/wallet/walletdb.cpp | 4 + src/wallet/walletdb.h | 2 +- 64 files changed, 2387 insertions(+), 596 deletions(-) create mode 100644 src/blocksigner.cpp create mode 100644 src/blocksigner.h create mode 100644 src/kernel.cpp create mode 100644 src/kernel.h create mode 100644 src/qt/res/icons/staking_active.png create mode 100644 src/qt/res/icons/staking_inactive.png create mode 100644 src/span.h diff --git a/configure.ac b/configure.ac index c3c6dc3145891..f0c644a770573 100644 --- a/configure.ac +++ b/configure.ac @@ -271,7 +271,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wshadow],[CXXFLAGS="$CXXFLAGS -Wshadow"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[CXXFLAGS="$CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]]) ## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all ## unknown options if any other warning is produced. Test the -Wfoo case, and diff --git a/src/Makefile.am b/src/Makefile.am index de6b93991ff21..5a0fb548f4a89 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -112,6 +112,7 @@ BITCOIN_CORE_H = \ bip39.h \ bip39_english.h \ blockencodings.h \ + blocksigner.h \ bloom.h \ cachemap.h \ cachemultimap.h \ @@ -163,6 +164,7 @@ BITCOIN_CORE_H = \ key.h \ keepass.h \ keystore.h \ + kernel.h \ dbwrapper.h \ limitedmap.h \ llmq/quorums.h \ @@ -265,6 +267,7 @@ libdash_server_a_SOURCES = \ batchedlogger.cpp \ bloom.cpp \ blockencodings.cpp \ + blocksigner.cpp \ chain.cpp \ checkpoints.cpp \ dsnotificationinterface.cpp \ @@ -279,6 +282,7 @@ libdash_server_a_SOURCES = \ httpserver.cpp \ init.cpp \ instantx.cpp \ + kernel.cpp \ dbwrapper.cpp \ governance.cpp \ governance-classes.cpp \ @@ -673,9 +677,9 @@ if EMBEDDED_LEVELDB include Makefile.leveldb.include endif -if ENABLE_TESTS -include Makefile.test.include -endif +#if ENABLE_TESTS +#include Makefile.test.include +#endif if ENABLE_BENCH include Makefile.bench.include @@ -685,6 +689,6 @@ if ENABLE_QT include Makefile.qt.include endif -if ENABLE_QT_TESTS -include Makefile.qttest.include -endif +#if ENABLE_QT_TESTS +#include Makefile.qttest.include +#endif diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index a50bf431334eb..def7a409869d9 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -452,7 +452,9 @@ RES_ICONS = \ qt/res/icons/trad/verify.png \ qt/res/icons/trad/fontbigger.png \ qt/res/icons/trad/fontsmaller.png \ - qt/res/icons/trad/network_disabled.png + qt/res/icons/trad/network_disabled.png \ + qt/res/icons/staking_active.png \ + qt/res/icons/staking_inactive.png BITCOIN_QT_BASE_CPP = \ qt/bantablemodel.cpp \ diff --git a/src/blocksigner.cpp b/src/blocksigner.cpp new file mode 100644 index 0000000000000..4832804b58709 --- /dev/null +++ b/src/blocksigner.cpp @@ -0,0 +1,83 @@ +#include +#include +#include +#include +#include +#include + +typedef std::vector valtype; + +bool SignBlockWithKey(CBlock& block, const CKey& key) +{ + if (!key.Sign(block.GetHash(), block.vchBlockSig)) + return error("%s: failed to sign block hash with key", __func__); + + return true; +} + +bool GetKeyIDFromUTXO(const CTxOut& txout, CKeyID& keyID) +{ + std::vector vSolutions; + txnouttype whichType; + if (!Solver(txout.scriptPubKey, whichType, vSolutions)) + return false; + if (whichType == TX_PUBKEY) { + keyID = CPubKey(vSolutions[0]).GetID(); + } else if (whichType == TX_PUBKEYHASH) { + keyID = CKeyID(uint160(vSolutions[0])); + } + + return true; +} + +bool SignBlock(CBlock& block, const CKeyStore& keystore) +{ + std::vector vSolutions; + CKeyID keyID; + if (block.IsProofOfWork()) { + bool fFoundID = false; + for (const CTxOut& txout :block.vtx[0]->vout) { + if (!GetKeyIDFromUTXO(txout, keyID)) + continue; + fFoundID = true; + break; + } + if (!fFoundID) + return error("%s: failed to find key for PoW", __func__); + } else { + if (!GetKeyIDFromUTXO(block.vtx[1]->vout[1], keyID)) + return error("%s: failed to find key for PoS", __func__); + } + + CKey key; + if (!keystore.GetKey(keyID, key)) + return error("%s: failed to get key from keystore", __func__); + + return SignBlockWithKey(block, key); +} + +bool CheckBlockSignature(const CBlock& block) +{ + std::vector vSolutions; + + if (block.IsProofOfWork()) + return block.vchBlockSig.empty(); + + if (block.vchBlockSig.empty()) + return error("%s: vchBlockSig is empty!", __func__); + + CPubKey pubkey; + txnouttype whichType; + const CTxOut& txout = block.vtx[1]->vout[1]; + if (!Solver(txout.scriptPubKey, whichType, vSolutions)) + return false; + if (whichType == TX_PUBKEY || whichType == TX_PUBKEYHASH) { + valtype& vchPubKey = vSolutions[0]; + pubkey = CPubKey(vchPubKey); + } + + if (!pubkey.IsValid()) + return error("%s: invalid pubkey %s", __func__, HexStr(pubkey)); + + return pubkey.Verify(block.GetHash(), block.vchBlockSig); +} diff --git a/src/blocksigner.h b/src/blocksigner.h new file mode 100644 index 0000000000000..a0c37c2b8c877 --- /dev/null +++ b/src/blocksigner.h @@ -0,0 +1,13 @@ +#ifndef BLOCKSIGNER_H +#define BLOCKSIGNER_H + +class CBlock; +class CPubKey; +class CKey; +class CKeyStore; + +bool SignBlockWithKey(CBlock& block, const CKey& key); +bool SignBlock(CBlock& block, const CKeyStore& keystore); +bool CheckBlockSignature(const CBlock& block); + +#endif // BLOCKSIGNER_H diff --git a/src/chain.cpp b/src/chain.cpp index 6154e24f2317d..6ef548b0ef2c3 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -111,6 +111,22 @@ const CBlockIndex* CBlockIndex::GetAncestor(int height) const return const_cast(this)->GetAncestor(height); } +unsigned int CBlockIndex::GetStakeEntropyBit() const +{ + unsigned int nEntropyBit = (UintToArith256(GetBlockHash()).GetLow64() & 1); + if (GetBoolArg("-printstakemodifier", false)) + LogPrintf("GetStakeEntropyBit: nHeight=%u hashBlock=%s nEntropyBit=%u\n", nHeight, GetBlockHash().ToString().c_str(), nEntropyBit); + + return nEntropyBit; +} + +void CBlockIndex::SetStakeModifier(uint64_t nModifier, bool fGeneratedStakeModifier) +{ + nStakeModifier = nModifier; + if (fGeneratedStakeModifier) + nFlags |= BLOCK_STAKE_MODIFIER; +} + void CBlockIndex::BuildSkip() { if (pprev) @@ -148,3 +164,39 @@ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& fr } return sign * r.GetLow64(); } + +/** Find the last common ancestor two blocks have. + * Both pa and pb must be non-nullptr. */ +const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb) { + if (pa->nHeight > pb->nHeight) { + pa = pa->GetAncestor(pb->nHeight); + } else if (pb->nHeight > pa->nHeight) { + pb = pb->GetAncestor(pa->nHeight); + } + + while (pa != pb && pa && pb) { + pa = pa->pprev; + pb = pb->pprev; + } + + // Eventually all chain branches meet at the genesis block. + assert(pa == pb); + return pa; +} + +arith_uint256 CBlockIndex::GetBlockTrust() const +{ + arith_uint256 bnTarget; + bnTarget.SetCompact(nBits); + if (bnTarget <= 0) + return 0; + + if (IsProofOfStake()) { + // Return trust score as usual + return (arith_uint256(1) << 256) / (bnTarget + 1); + } else { + // Calculate work amount for block + arith_uint256 bnPoWTrust = ((~arith_uint256(0) >> 20) / (bnTarget + 1)); + return bnPoWTrust > 1 ? bnPoWTrust : 1; + } +} diff --git a/src/chain.h b/src/chain.h index ff72ff684cc58..4652c453ec41b 100644 --- a/src/chain.h +++ b/src/chain.h @@ -11,6 +11,7 @@ #include "pow.h" #include "tinyformat.h" #include "uint256.h" +#include "util.h" #include @@ -18,6 +19,7 @@ * 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_STAKE_TIME = 15 * 60; static const int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60; /** @@ -179,6 +181,9 @@ class CBlockIndex //! pointer to the index of some further predecessor of this block CBlockIndex* pskip; + //ppcoin: trust score of block chain + uint256 bnChainTrust; + //! height of the entry in the chain. The genesis block has height 0 int nHeight; @@ -204,7 +209,24 @@ class CBlockIndex unsigned int nChainTx; //! Verification status of this block. See enum BlockStatus - unsigned int nStatus; + uint32_t nStatus; + + unsigned int nFlags; // ppcoin: block index flags + enum { + BLOCK_PROOF_OF_STAKE = (1 << 0), // is proof-of-stake block + BLOCK_STAKE_ENTROPY = (1 << 1), // entropy bit for stake modifier + BLOCK_STAKE_MODIFIER = (1 << 2), // regenerated stake modifier + }; + + // proof-of-stake specific fields + arith_uint256 GetBlockTrust() const; + uint64_t nStakeModifier; // hash modifier for proof-of-stake + unsigned int nStakeModifierChecksum; // checksum of index; in-memeory only + COutPoint prevoutStake; + unsigned int nStakeTime; + uint256 hashProofOfStake; + int64_t nMint; + int64_t nMoneySupply; //! block header int nVersion; @@ -235,6 +257,15 @@ class CBlockIndex nSequenceId = 0; nTimeMax = 0; + nMint = 0; + bnChainTrust = uint256(); + nMoneySupply = 0; + nFlags = 0; + nStakeModifier = 0; + nStakeModifierChecksum = 0; + prevoutStake.SetNull(); + nStakeTime = 0; + nVersion = 0; hashMerkleRoot = uint256(); nTime = 0; @@ -247,7 +278,7 @@ class CBlockIndex SetNull(); } - CBlockIndex(const CBlockHeader& block) + CBlockIndex(const CBlock& block) { SetNull(); @@ -256,6 +287,24 @@ class CBlockIndex nTime = block.nTime; nBits = block.nBits; nNonce = block.nNonce; + + //Proof of Stake + bnChainTrust = uint256(); + nMint = 0; + nMoneySupply = 0; + nFlags = 0; + nStakeModifier = 0; + nStakeModifierChecksum = 0; + hashProofOfStake = uint256(); + + if (block.IsProofOfStake()) { + SetProofOfStake(); + prevoutStake = block.vtx[1]->vin[0].prevout; + nStakeTime = block.nTime; + } else { + prevoutStake.SetNull(); + nStakeTime = 0; + } } CDiskBlockPos GetBlockPos() const { @@ -320,6 +369,38 @@ class CBlockIndex return pbegin[(pend - pbegin)/2]; } + bool IsProofOfWork() const + { + return !(nFlags & BLOCK_PROOF_OF_STAKE); + } + + bool IsProofOfStake() const + { + return (nFlags & BLOCK_PROOF_OF_STAKE); + } + + void SetProofOfStake() + { + nFlags |= BLOCK_PROOF_OF_STAKE; + } + + unsigned int GetStakeEntropyBit() const; + + bool SetStakeEntropyBit(unsigned int nEntropyBit) + { + if (nEntropyBit > 1) + return false; + nFlags |= (nEntropyBit ? BLOCK_STAKE_ENTROPY : 0); + return true; + } + + bool GeneratedStakeModifier() const + { + return (nFlags & BLOCK_STAKE_MODIFIER); + } + + void SetStakeModifier(uint64_t nModifier, bool fGeneratedStakeModifier); + std::string ToString() const { return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)", @@ -398,6 +479,20 @@ class CDiskBlockIndex : public CBlockIndex if (nStatus & BLOCK_HAVE_UNDO) READWRITE(VARINT(nUndoPos)); + READWRITE(nMint); + READWRITE(nMoneySupply); + READWRITE(nFlags); + READWRITE(nStakeModifier); + if (IsProofOfStake()) { + READWRITE(prevoutStake); + READWRITE(nStakeTime); + READWRITE(hashProofOfStake); + } else { + const_cast(this)->prevoutStake.SetNull(); + const_cast(this)->nStakeTime = 0; + const_cast(this)->hashProofOfStake = uint256(); + } + // block hash READWRITE(hash); // block header diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b1078edf46a7c..e78dbe6e61cd3 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -223,8 +223,15 @@ class CMainParams : public CChainParams { consensus.DIP0003EnforcementHeight = 1047200; consensus.DIP0003EnforcementHash = uint256S("000000000000002d1734087b4c5afc3133e4e1c3e1a89218f62bcd9bb3d17f81"); consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 20 + consensus.posLimit = uint256S("0007ffff00000000000000000000000000000000000000000000000000000000"); + consensus.nLastPoWBlock = 100; consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes + consensus.nPosTargetSpacing = consensus.nPowTargetSpacing; + consensus.nPosTargetTimespan = consensus.nPowTargetTimespan; + consensus.nStakeMinAge = 10 * 60; + consensus.nStakeMaxAge = 60 * 60 * 24 * 30; + consensus.nModifierInterval = 60 * 20; consensus.fPowAllowMinDifficultyBlocks = false; consensus.fPowNoRetargeting = false; consensus.nPowKGWHeight = 15200; @@ -381,8 +388,8 @@ class CTestNetParams : public CChainParams { public: CTestNetParams() { strNetworkID = "test"; - consensus.nSubsidyHalvingInterval = 210240; - consensus.nMasternodePaymentsStartBlock = 4010; // not true, but it's ok as long as it's less then nMasternodePaymentsIncreaseBlock + consensus.nSubsidyHalvingInterval = 250; + consensus.nMasternodePaymentsStartBlock = 500; consensus.nMasternodePaymentsIncreaseBlock = 4030; consensus.nMasternodePaymentsIncreasePeriod = 10; consensus.nInstantSendConfirmationsRequired = 2; @@ -400,21 +407,28 @@ class CTestNetParams : public CChainParams { consensus.nMasternodeMinimumConfirmations = 1; consensus.BIP34Height = 76; consensus.BIP34Hash = uint256S("0x000008ebb1db2598e897d17275285767717c6acfeac4c73def49fbea1ddcbcb6"); - consensus.BIP65Height = 2431; // 0000039cf01242c7f921dcb4806a5994bc003b48c1973ae0c89b67809c2bb2ab - consensus.BIP66Height = 2075; // 0000002acdd29a14583540cb72e1c5cc83783560e38fa7081495d474fe1671f7 + consensus.BIP65Height = 2431; + consensus.BIP66Height = 2075; consensus.DIP0001Height = 5500; consensus.DIP0003Height = 7000; consensus.DIP0003EnforcementHeight = 7300; consensus.DIP0003EnforcementHash = uint256S("00000055ebc0e974ba3a3fb785c5ad4365a39637d4df168169ee80d313612f8f"); - consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 20 - consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day - consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes + consensus.powLimit = uint256S("0000fffff0000000000000000000000000000000000000000000000000000000"); + consensus.posLimit = uint256S("0007ffff00000000000000000000000000000000000000000000000000000000"); + consensus.nLastPoWBlock = 30; + consensus.nPowTargetTimespan = 180 * 4; + consensus.nPowTargetSpacing = 180 * 1; + consensus.nPosTargetSpacing = consensus.nPowTargetSpacing; + consensus.nPosTargetTimespan = consensus.nPowTargetTimespan; + consensus.nStakeMinAge = 5 * 60; + consensus.nStakeMaxAge = 60 * 60 * 24 * 30; + consensus.nModifierInterval = 60 * 20; consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = false; - consensus.nPowKGWHeight = 4002; // nPowKGWHeight >= nPowDGWHeight means "no KGW" + consensus.nPowKGWHeight = 4002; consensus.nPowDGWHeight = 4002; - consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains - consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing + consensus.nRuleChangeActivationThreshold = 1512; + consensus.nMinerConfirmationWindow = 2016; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 @@ -453,31 +467,38 @@ class CTestNetParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_DIP0008].nThreshold = 50; // 50% of 100 // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000062cd3e94ad2d62"); // 95930 + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000000000"); // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x0000000005ae4db9746d6cad8e0ccebdef1e05afec9c40809f31457fdaf7d843"); // 95930 + consensus.defaultAssumeValid = uint256S("0x0000000000000000000000000000000000000000000000000000000000000000"); - pchMessageStart[0] = 0xce; - pchMessageStart[1] = 0xe2; - pchMessageStart[2] = 0xca; - pchMessageStart[3] = 0xff; + pchMessageStart[0] = 0x01; + pchMessageStart[1] = 0x23; + pchMessageStart[2] = 0x45; + pchMessageStart[3] = 0x67; vAlertPubKey = ParseHex("04517d8a699cb43d3938d7b24faaff7cda448ca4ea267723ba614784de661949bf632d6304316b244646dea079735b9a6fc4af804efb4752075b9fe2245e14e412"); - nDefaultPort = 19999; + nDefaultPort = 29999; nPruneAfterHeight = 1000; - genesis = CreateGenesisBlock(1390666206UL, 3861367235UL, 0x1e0ffff0, 1, 50 * COIN); - consensus.hashGenesisBlock = genesis.GetHash(); - assert(consensus.hashGenesisBlock == uint256S("0x00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")); - assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7")); + ///////////////////////////////////////////////////////////////////////// + uint32_t nTime = 1559300000; + uint32_t nNonce = 0; + while (UintToArith256(genesis.GetHash()) > + UintToArith256(consensus.powLimit)) { + nNonce++; + genesis = CreateGenesisBlock(nTime, nNonce, 0x1f00ffff, 1, 0 * COIN); + } + genesis = CreateGenesisBlock(nTime, nNonce, 0x1f00ffff, 1, 0 * COIN); + consensus.hashGenesisBlock = genesis.GetHash(); + ///////////////////////////////////////////////////////////////////////// + + // assert(consensus.hashGenesisBlock == uint256S("0x00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")); + // assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7")); vFixedSeeds.clear(); vFixedSeeds = std::vector(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); vSeeds.clear(); - // nodes with support for servicebits filtering should be at the top - vSeeds.push_back(CDNSSeedData("dashdot.io", "testnet-seed.dashdot.io")); - vSeeds.push_back(CDNSSeedData("masternode.io", "test.dnsseed.masternode.io")); // Testnet Dash addresses start with 'y' base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,140); @@ -500,10 +521,10 @@ class CTestNetParams : public CChainParams { consensus.llmqChainLocks = Consensus::LLMQ_50_60; consensus.llmqForInstantSend = Consensus::LLMQ_50_60; - fMiningRequiresPeers = true; + fMiningRequiresPeers = false; fDefaultConsistencyChecks = false; fRequireStandard = false; - fRequireRoutableExternalIP = true; + fRequireRoutableExternalIP = false; fMineBlocksOnDemand = false; fAllowMultipleAddressesFromGroup = false; fAllowMultiplePorts = true; @@ -567,8 +588,15 @@ class CDevNetParams : public CChainParams { consensus.DIP0003EnforcementHeight = 2; // DIP0003 activated immediately on devnet consensus.DIP0003EnforcementHash = uint256(); consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1 + consensus.posLimit = uint256S("007ffff000000000000000000000000000000000000000000000000000000000"); + consensus.nLastPoWBlock = 100; consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes + consensus.nPosTargetSpacing = consensus.nPowTargetSpacing; + consensus.nPosTargetTimespan = consensus.nPowTargetTimespan; + consensus.nStakeMinAge = 10 * 60; + consensus.nStakeMaxAge = 60 * 60 * 24 * 30; + consensus.nModifierInterval = 60 * 20; consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = false; consensus.nPowKGWHeight = 4001; // nPowKGWHeight >= nPowDGWHeight means "no KGW" @@ -735,8 +763,15 @@ class CRegTestParams : public CChainParams { consensus.DIP0003EnforcementHeight = 500; consensus.DIP0003EnforcementHash = uint256(); consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1 + consensus.posLimit = uint256S("007ffff000000000000000000000000000000000000000000000000000000000"); + consensus.nLastPoWBlock = 100; consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes + consensus.nPosTargetSpacing = consensus.nPowTargetSpacing; + consensus.nPosTargetTimespan = consensus.nPowTargetTimespan; + consensus.nStakeMinAge = 10 * 60; + consensus.nStakeMaxAge = 60 * 60 * 24 * 30; + consensus.nModifierInterval = 60 * 20; consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = true; consensus.nPowKGWHeight = 15200; // same as mainnet diff --git a/src/chainparams.h b/src/chainparams.h index f59ba102cd48d..4ca11caf1d99e 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -60,6 +60,7 @@ class CChainParams const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; } const std::vector& AlertKey() const { return vAlertPubKey; } int GetDefaultPort() const { return nDefaultPort; } + int MaxReorganizationDepth() const { return nMaxReorganizationDepth; } const CBlock& GenesisBlock() const { return genesis; } const CBlock& DevNetGenesisBlock() const { return devnetGenesis; } @@ -122,6 +123,7 @@ class CChainParams int nFulfilledRequestExpireTime; std::vector vSporkAddresses; int nMinSporkKeys; + int nMaxReorganizationDepth; bool fBIP9CheckMasternodesUpgraded; }; diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index c2853703745eb..871ec863892d5 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -8,318 +8,8 @@ * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly. */ static SeedSpec6 pnSeed6_main[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x63,0x50}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x84,0xbf,0x6d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x84,0xbf,0xd3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x84,0xbf,0xd5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x84,0xbf,0xd8}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x86,0x73,0x25}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xbd,0xab,0x40}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc8,0x17,0x21}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc8,0x35,0x60}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xdd,0x60,0x95}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xaf,0x00,0x6f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xaf,0x00,0x70}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xaf,0x00,0x71}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xaf,0x00,0x72}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xb6,0x80,0x15}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xb6,0x80,0x17}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xb6,0x80,0x18}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xb6,0x80,0x19}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xa0,0x4c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xa3,0x17}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xa3,0x34}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1b,0x66,0x72,0x3d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x1f,0x49,0x52}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xc4,0x60,0x63}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xc7,0x82,0x45}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xe1,0x65,0x61}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0xa7,0xc0,0xa5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0xc4,0xf2,0xe3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x23,0xc5,0xbb,0x01}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x61,0xe3,0x15}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x78,0xa1,0x91}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x9d,0xc7,0xd2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xdd,0xc0,0xdc}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xdd,0xc2,0x2a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xdd,0xc2,0x2b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x28,0x71,0x06,0x2c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2b,0xe5,0x4d,0x2e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x20,0xce,0xb9}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4c,0x40,0x06}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0x6d,0xc3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x25,0x9e,0xb1}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa3,0xa6,0x39}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x34,0xe5,0x48}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x4b,0x31,0xe4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x5a,0x0e,0x9c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x62,0x42,0x5e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x68,0x60,0xcf}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0xf4,0x66,0x51}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x0f,0x2a,0x8f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x26,0x69,0x24}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0x26,0x80,0xfb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x33,0xff,0x20,0xd5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x4f,0x70,0x16}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0xbb,0x87,0xbb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0xeb,0x24,0xbb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0xf2,0x25,0x08}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0x46,0xe7,0xc3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xac,0x91,0xa2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x8a,0x03,0xd6}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x8a,0x08,0x07}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x8a,0x08,0x67}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x92,0x0d,0x32}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x8e,0xfd,0x55}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x22,0xda,0x30}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x8c,0x9d,0x72}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x8c,0x9f,0xe2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x17,0xf2,0x56}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x17,0xf2,0x59}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x17,0xf2,0x5a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x17,0xf2,0x5b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xac,0x0b,0x55}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xac,0x1b,0x46}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x33,0x0d,0x5a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x33,0x0d,0x65}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x33,0x14,0x46}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x33,0x14,0x47}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xcf,0xe4,0xb4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x7f,0x04,0xf8}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x4a,0xdb,0x94}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x51,0xe2,0x92}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x29,0xcf,0x46}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x53,0x13,0x00}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x85,0xa9,0x46}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x78,0x1b,0x96}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xa9,0xcd,0xdc}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xa9,0xe5,0x54}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xab,0x02,0xf5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x76,0xe3,0x34}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa5,0x1d,0x67}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x15,0x80}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x15,0x83}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x15,0x88}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x15,0x8b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xea,0x60,0x52}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xea,0x60,0x56}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xea,0x60,0x57}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xc7,0xd7}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xb8,0xfe,0x1d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xb8,0xfe,0xb5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd9,0xaa,0xce}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd9,0xab,0xf3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xff,0x01,0x41}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xff,0x04,0xd4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x6a,0x3f,0x34}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x75,0xfd,0x37}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x24,0xdc,0xf1}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x28,0x00,0x0e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x28,0x72,0x45}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xee,0xb5,0x4a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdb,0xef,0x52}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdb,0xef,0x53}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x3f,0x39,0x1c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x3f,0x39,0x78}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x5a,0xcd,0x50}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x68,0xd5,0xd0}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x9e,0xd8,0x99}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x9c,0xae,0xa6}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb0,0xef,0x3e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xaa,0xdf}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xe0,0xe1}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xe1,0x73}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xe1,0xd2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xe8,0x21}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xb1,0xfa,0x3d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x2b,0x8b,0xa2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xb5,0xe2,0x2f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xb7,0x32,0x61}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xb7,0x33,0x62}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xb7,0x33,0x8d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xb7,0x35,0x86}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0x0b,0x39}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0x93,0x2f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x7e,0x60,0xa4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x65,0x25,0x60,0x00}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x65,0x25,0x60,0x60}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xc4,0xa9,0x51}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xdf,0x06,0xa4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x06,0x8c,0x23}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x06,0x8c,0x37}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x06,0xaf,0x96}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x9b,0x76,0x89}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xbf,0x65,0xd4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0xe0,0x16}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0xe0,0x21}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6e,0x0a,0x19,0x4c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x9f,0x56,0x76}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x6a,0x37,0xd6}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x72,0xad,0xda}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7b,0xc1,0x40,0xa6}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xb9,0xfb,0x45}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xb9,0xfb,0x71}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x85,0x82,0x66,0x16}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8b,0x63,0xc1,0x17}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0x42,0x32,0x2a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x97,0xec,0x0a,0x6d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x7f,0x39,0xf0}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x7f,0x39,0xfe}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x7f,0x3b,0x1b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x7f,0x3c,0x08}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0x9b,0x5e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x59,0x20,0x0c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x64,0x13,0xa6}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x64,0x13,0xa7}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xcb,0x14,0x83}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa3,0x2c,0xa7,0x90}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa3,0x2c,0xa7,0xed}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa3,0x2c,0xa8,0xbf}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x58,0x0f,0x61}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0xeb,0x60,0xcb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0xeb,0x60,0xcd}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa8,0xeb,0x63,0x2f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaa,0x4b,0xa2,0x3c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaa,0x4b,0xa2,0xdb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaa,0x4b,0xa3,0x6c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x51,0xb1,0x2a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x56,0x79,0x94}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x68,0x40,0x0d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x6e,0x05,0x62}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xac,0x6e,0x06,0xa9}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd4,0xf1,0x32}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x7a,0x14,0xcf}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xa0,0x1d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xd1,0x32,0x1e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xee,0x2a,0x07}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x16,0xae,0x25}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x1a,0x7e,0xfa}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x1c,0x65,0x5b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x1c,0x65,0x85}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x23,0x40,0xd9}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x23,0x43,0x75}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x2b,0xd2,0x7d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3a,0xc2,0x71}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3a,0xe0,0xea}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x68,0xdd}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x68,0xde}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x68,0xdf}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x6a,0x7a,0x2e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x77,0x55,0x1e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x85,0x25,0x69}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x8b,0xed,0x9a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x8d,0x1a,0x6a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x8e,0xd4,0x90}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x9c,0xb2,0x7d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x9c,0xb2,0xd8}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x9c,0xb2,0xda}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x9c,0xb2,0xde}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xa5,0xa8,0x15}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xa5,0xa8,0x16}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xa5,0xa8,0x17}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xa5,0xa8,0x19}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xa8,0x08,0x90}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xb7,0x61,0x83}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xb9,0x28,0x0d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xcb,0x75,0xe5}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xd4,0x2c,0xfa}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xd5,0x25,0x01}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xd5,0x25,0x06}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xd9,0x01,0x63}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xd9,0x01,0x64}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xf3,0x70,0x30}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xf3,0x70,0x50}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xf3,0x70,0xbb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xf3,0x70,0xdd}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xfd,0xbd,0x12}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xfd,0xbd,0x42}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xfd,0xbd,0x46}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0xfd,0xbd,0x50}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa6,0x45,0x58}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe3,0x4a,0xab}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe3,0x4a,0xc1}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x04,0xb8,0xb4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x0a,0x08,0xfa}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x51,0x82,0xe4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xa1,0xb6,0x68}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xa1,0xb6,0x6c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xa1,0xb6,0x6d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xe3,0x8f,0x29}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xe3,0xe4,0xc4}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xfa,0xe6,0x11}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x1d,0xbb,0x55}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xea,0xe0,0x48}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xea,0xe0,0x64}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xea,0xe0,0x67}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xea,0xe0,0x91}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x63,0x14,0x64}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0x69,0x6d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0x69,0x7d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x14,0x65,0x74}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x17,0x80,0x4b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x35,0x4a,0x0e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3d,0xbe,0x8e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc9,0x6e,0xc3}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc8,0x7a,0x80,0xac}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x47,0x62,0x7b}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x47,0x62,0x7c}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x47,0x62,0x7d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x47,0x62,0x7e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x10,0xf3,0x6a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x10,0xf5,0x62}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xb1,0x58,0x57}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xb1,0x5b,0xcb}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x18,0x60,0x10}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x18,0x60,0x1a}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x2f,0xeb,0xfd}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0xe3,0xc9,0x2f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0xed,0x25,0xf0}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x40,0xc5,0x5f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x88,0x50,0x5d}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x88,0x50,0x9f}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x6b,0xd9,0x3e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xbd,0x91,0xa1}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xbd,0x93,0xb2}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x3d,0x02,0x35}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdd,0x9c,0x85,0x6e}, 9999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xde,0xe7,0x3b,0x1e}, 9999} }; static SeedSpec6 pnSeed6_test[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20008}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20004}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20000}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20012}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20016}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xca,0x34,0xaa}, 20020}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20007}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20003}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20015}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20011}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20019}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xff,0x0f,0x14}, 20023}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20009}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20005}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20001}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20013}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20017}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x34,0x32,0xd0,0x35}, 20021}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20010}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20006}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20002}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20014}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20018}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x21,0xee,0x55}, 20022}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x10}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x11}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x12}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x13}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x14}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x15}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x16}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x17}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x18}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xeb,0x19}, 19999}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xcb,0xf9}, 19999} }; #endif // DASH_CHAINPARAMSSEEDS_H diff --git a/src/coins.cpp b/src/coins.cpp index 1f8baa2b1ba1e..4e612a56b85a0 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -13,8 +13,9 @@ bool CCoinsView::GetCoin(const COutPoint &outpoint, Coin &coin) const { return false; } uint256 CCoinsView::GetBestBlock() const { return uint256(); } +std::vector CCoinsView::GetHeadBlocks() const { return std::vector(); } bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; } -CCoinsViewCursor *CCoinsView::Cursor() const { return 0; } +CCoinsViewCursor *CCoinsView::Cursor() const { return nullptr; } bool CCoinsView::HaveCoin(const COutPoint &outpoint) const { @@ -26,6 +27,7 @@ CCoinsViewBacked::CCoinsViewBacked(CCoinsView *viewIn) : base(viewIn) { } bool CCoinsViewBacked::GetCoin(const COutPoint &outpoint, Coin &coin) const { return base->GetCoin(outpoint, coin); } bool CCoinsViewBacked::HaveCoin(const COutPoint &outpoint) const { return base->HaveCoin(outpoint); } uint256 CCoinsViewBacked::GetBestBlock() const { return base->GetBestBlock(); } +std::vector CCoinsViewBacked::GetHeadBlocks() const { return base->GetHeadBlocks(); } void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; } bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); } CCoinsViewCursor *CCoinsViewBacked::Cursor() const { return base->Cursor(); } @@ -86,13 +88,14 @@ void CCoinsViewCache::AddCoin(const COutPoint &outpoint, Coin&& coin, bool possi cachedCoinsUsage += it->second.coin.DynamicMemoryUsage(); } -void AddCoins(CCoinsViewCache& cache, const CTransaction &tx, int nHeight) { +void AddCoins(CCoinsViewCache& cache, const CTransaction &tx, int nHeight, bool check) { bool fCoinbase = tx.IsCoinBase(); const uint256& txid = tx.GetHash(); for (size_t i = 0; i < tx.vout.size(); ++i) { - // Pass fCoinbase as the possible_overwrite flag to AddCoin, in order to correctly - // deal with the pre-BIP30 occurrances of duplicate coinbase transactions. - cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase), fCoinbase); + bool overwrite = check ? cache.HaveCoin(COutPoint(txid, i)) : fCoinbase; + // Always set the possible_overwrite flag to AddCoin for coinbase txn, in order to correctly + // deal with the pre-BIP30 occurrences of duplicate coinbase transactions. + cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase, tx.IsCoinStake()), overwrite); } } diff --git a/src/coins.h b/src/coins.h index e2606c7c21bea..a72e3ebfcb453 100644 --- a/src/coins.h +++ b/src/coins.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_COINS_H #define BITCOIN_COINS_H +#include "primitives/transaction.h" #include "compressor.h" #include "core_memusage.h" #include "hash.h" @@ -15,6 +16,7 @@ #include #include +#include #include /** @@ -32,32 +34,52 @@ class Coin //! whether containing transaction was a coinbase unsigned int fCoinBase : 1; + //! whether containing transaction was a coinstake + unsigned int fCoinStake : 1; //! at which height this containing transaction was included in the active block chain - uint32_t nHeight : 31; + uint32_t nHeight : 30; //! construct a Coin from a CTxOut and height/coinbase information. - Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn) : out(std::move(outIn)), fCoinBase(fCoinBaseIn), nHeight(nHeightIn) {} - Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn) : out(outIn), fCoinBase(fCoinBaseIn),nHeight(nHeightIn) {} + Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn, bool fCoinStakeIn) : + out(std::move(outIn)), + fCoinBase(fCoinBaseIn), + fCoinStake(fCoinStakeIn), + nHeight(nHeightIn) + { } + + Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn, bool fCoinStakeIn) : + out(outIn), + fCoinBase(fCoinBaseIn), + fCoinStake(fCoinStakeIn), + nHeight(nHeightIn) + { } void Clear() { out.SetNull(); fCoinBase = false; + fCoinStake = false; nHeight = 0; } //! empty constructor - Coin() : fCoinBase(false), nHeight(0) { } + Coin() : fCoinBase(false), fCoinStake(false), nHeight(0) { } bool IsCoinBase() const { return fCoinBase; } + bool IsCoinStake() const { + return fCoinStake; + } + template void Serialize(Stream &s) const { assert(!IsSpent()); - uint32_t code = nHeight * 2 + fCoinBase; - ::Serialize(s, VARINT(code)); + std::bitset<32> code(nHeight); + code[30] = fCoinStake; + code[31] = fCoinBase; + ::Serialize(s, VARINT(code.to_ulong())); ::Serialize(s, CTxOutCompressor(REF(out))); } @@ -65,9 +87,13 @@ class Coin void Unserialize(Stream &s) { uint32_t code = 0; ::Unserialize(s, VARINT(code)); - nHeight = code >> 1; - fCoinBase = code & 1; - ::Unserialize(s, REF(CTxOutCompressor(out))); + std::bitset<32> bitset(code); + fCoinBase = bitset[31]; + fCoinStake = bitset[30]; + bitset.reset(30); + bitset.reset(31); + nHeight = bitset.to_ulong(); + ::Unserialize(s, CTxOutCompressor(out)); } bool IsSpent() const { @@ -128,7 +154,6 @@ class CCoinsViewCursor virtual bool GetKey(COutPoint &key) const = 0; virtual bool GetValue(Coin &coin) const = 0; - /* Don't care about GetKeySize here */ virtual unsigned int GetValueSize() const = 0; virtual bool Valid() const = 0; @@ -156,6 +181,12 @@ class CCoinsView //! Retrieve the block hash whose state this CCoinsView currently represents virtual uint256 GetBestBlock() const; + //! Retrieve the range of blocks that may have been only partially written. + //! If the database is in a consistent state, the result is the empty vector. + //! Otherwise, a two-element vector is returned consisting of the new and + //! the old block hash, in that order. + virtual std::vector GetHeadBlocks() const; + //! Do a bulk modification (multiple Coin changes + BestBlock change). //! The passed mapCoins can be modified. virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); @@ -182,6 +213,7 @@ class CCoinsViewBacked : public CCoinsView bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; bool HaveCoin(const COutPoint &outpoint) const override; uint256 GetBestBlock() const override; + std::vector GetHeadBlocks() const override; void SetBackend(CCoinsView &viewIn); bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) override; CCoinsViewCursor *Cursor() const override; @@ -206,6 +238,11 @@ class CCoinsViewCache : public CCoinsViewBacked public: CCoinsViewCache(CCoinsView *baseIn); + /** + * By deleting the copy constructor, we prevent accidentally using it when one intends to create a cache on top of a base cache. + */ + CCoinsViewCache(const CCoinsViewCache &) = delete; + // Standard CCoinsView methods bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; bool HaveCoin(const COutPoint &outpoint) const override; @@ -282,18 +319,15 @@ class CCoinsViewCache : public CCoinsViewBacked private: CCoinsMap::iterator FetchCoin(const COutPoint &outpoint) const; - - /** - * By making the copy constructor private, we prevent accidentally using it when one intends to create a cache on top of a base cache. - */ - CCoinsViewCache(const CCoinsViewCache &); }; //! Utility function to add all of a transaction's outputs to a cache. -// It assumes that overwrites are only possible for coinbase transactions, +// When check is false, this assumes that overwrites are only possible for coinbase transactions. +// When check is true, the underlying view may be queried to determine whether an addition is +// an overwrite. // TODO: pass in a boolean to limit these possible overwrites to known // (pre-BIP34) cases. -void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight); +void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, bool check = false); //! Utility function to find any unspent output with a given txid. // This function can be quite expensive because in the event of a transaction diff --git a/src/compat.h b/src/compat.h index 2e9663b8d63f3..f68e9a5edee22 100644 --- a/src/compat.h +++ b/src/compat.h @@ -74,6 +74,17 @@ typedef u_int SOCKET; #define MAX_PATH 1024 #endif +#ifndef WIN32 +// PRIO_MAX is not defined on Solaris +#ifndef PRIO_MAX +#define PRIO_MAX 20 +#endif +#define THREAD_PRIORITY_LOWEST PRIO_MAX +#define THREAD_PRIORITY_BELOW_NORMAL 2 +#define THREAD_PRIORITY_NORMAL 0 +#define THREAD_PRIORITY_ABOVE_NORMAL (-2) +#endif + // As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0 #if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL) #define MSG_NOSIGNAL 0 diff --git a/src/compressor.h b/src/compressor.h index 961365d2618a4..57c365afb4607 100644 --- a/src/compressor.h +++ b/src/compressor.h @@ -14,6 +14,13 @@ class CKeyID; class CPubKey; class CScriptID; +bool CompressScript(const CScript& script, std::vector &out); +unsigned int GetSpecialScriptSize(unsigned int nSize); +bool DecompressScript(CScript& script, unsigned int nSize, const std::vector &out); + +uint64_t CompressAmount(uint64_t nAmount); +uint64_t DecompressAmount(uint64_t nAmount); + /** Compact serializer for scripts. * * It detects common cases and encodes them much more efficiently. diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index 0efe580c1e082..a8278674d38a7 100644 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -21,7 +21,7 @@ inline unsigned int MaxBlockSigOps(bool fDIP0001Active /*= false */) /** The maximum allowed size of version 3 extra payload */ static const unsigned int MAX_TX_EXTRA_PAYLOAD = 10000; /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ -static const int COINBASE_MATURITY = 100; +static const int COINBASE_MATURITY = 20; /** Flags for nSequence and nLockTime locks */ enum { diff --git a/src/consensus/params.h b/src/consensus/params.h index 9fae740720da3..c0c384e3b80bc 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -168,10 +168,19 @@ struct Params { int64_t nPowTargetTimespan; int nPowKGWHeight; int nPowDGWHeight; + int nLastPoWBlock; int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; } uint256 nMinimumChainWork; uint256 defaultAssumeValid; + /** Proof of stake parameters */ + uint256 posLimit; + int64_t nPosTargetSpacing; + int64_t nPosTargetTimespan; + int nStakeMinAge; + int nStakeMaxAge; + int64_t nModifierInterval; + /** these parameters are only used on devnet and can be configured from the outside */ int nMinimumDifficultyBlocks{0}; int nHighSubsidyBlocks{0}; diff --git a/src/init.cpp b/src/init.cpp index 65101215625f1..c97ce386eab67 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2129,6 +2129,10 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) pwalletMain->postInitProcess(scheduler); #endif + if(GetBoolArg("-staking", true)) { + threadGroup.create_thread(std::bind(&ThreadStakeMinter, boost::ref(chainparams), boost::ref(connman))); + } + threadGroup.create_thread(boost::bind(&ThreadSendAlert, boost::ref(connman))); return !fRequestShutdown; diff --git a/src/kernel.cpp b/src/kernel.cpp new file mode 100644 index 0000000000000..5f0805672d0cb --- /dev/null +++ b/src/kernel.cpp @@ -0,0 +1,410 @@ +// Copyright (c) 2012-2013 The PPCoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#include + +#include +#include +#include +#include