Skip to content

Commit

Permalink
Final release commit for Version 3 (V3)
Browse files Browse the repository at this point in the history
- Added Copyrights for the new chain features.
- Fixed compiler warnings.
- Small improvements.
  • Loading branch information
globaltoken committed Sep 16, 2018
1 parent 5596939 commit 91da8f2
Show file tree
Hide file tree
Showing 24 changed files with 119 additions and 43 deletions.
8 changes: 4 additions & 4 deletions configure.ac
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 999)
define(_CLIENT_VERSION_REVISION, 999)
define(_CLIENT_VERSION_BUILD, 999)
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_GLT_START, 2017)
define(_COPYRIGHT_YEAR, 2018)
Expand Down
1 change: 1 addition & 0 deletions src/auxpow.cpp
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) 2011 Vince Durham
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2017 Daniel Kraft
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
9 changes: 5 additions & 4 deletions src/auxpow.h
@@ -1,6 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2016 Daniel Kraft
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -199,7 +200,7 @@ class CAuxPow

/* Prevent accidental conversion. */
inline explicit CAuxPow (CPOSTransactionRef txIn)
: coinbasePOSTx (txIn), coinbaseTx()
: coinbaseTx(), coinbasePOSTx (txIn)
{}

/* Prevent accidental conversion. */
Expand Down Expand Up @@ -284,7 +285,7 @@ class CAuxPow
}

/* get the version of auxpow. */
inline const uint32_t
inline const uint32_t&
getVersion() const
{
return nVersion;
Expand All @@ -305,14 +306,14 @@ class CAuxPow
}

/* get the chain merkle branch of auxpow. */
inline const std::vector<uint256>
inline const std::vector<uint256>&
GetChainMerkleBranch() const
{
return vChainMerkleBranch;
}

/* get the chain index of auxpow. */
inline const int
inline const int&
GetChainIndex() const
{
return nChainIndex;
Expand Down
1 change: 0 additions & 1 deletion src/chain.cpp
@@ -1,5 +1,4 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2017 The MyriadCoin Core developers
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
78 changes: 65 additions & 13 deletions src/chainparams.cpp
@@ -1,6 +1,10 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2016-2017 The Zcash developers
// Copyright (c) 2018 The Bitcoin Private developers
// Copyright (c) 2017-2018 The Bitcoin Gold developers
// Copyright (c) 2017-2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down Expand Up @@ -204,7 +208,30 @@ class CMainParams : public CChainParams {
// service bits we want, but we should get them updated to support all service bits wanted by any
// release ASAP to avoid it where possible.
vSeeds.emplace_back("134.255.221.7"); // Globaltoken base node
vSeeds.emplace_back("globaltoken.org"); // GlobalToken base node II
vSeeds.emplace_back("explorer.globaltoken.org"); // GlobalToken base node III
vSeeds.emplace_back("lameserver.de"); // GlobalToken Node by Astrali
vSeeds.emplace_back("pool.cryptopowered.club"); // GlobalToken Cryptopowered node
vSeeds.emplace_back("bit2pool.com"); // GlobalToken Bit2Pool node
// Hardfork Seednodes
vSeeds.emplace_back("185.206.144.200"); // GlobalToken Hardfork node: 01/18
vSeeds.emplace_back("185.206.145.201"); // GlobalToken Hardfork node: 02/18
vSeeds.emplace_back("185.206.146.200"); // GlobalToken Hardfork node: 03/18
vSeeds.emplace_back("185.206.147.203"); // GlobalToken Hardfork node: 04/18
vSeeds.emplace_back("185.205.209.67"); // GlobalToken Hardfork node: 05/18
vSeeds.emplace_back("185.206.147.202"); // GlobalToken Hardfork node: 06/18
vSeeds.emplace_back("185.205.209.137"); // GlobalToken Hardfork node: 07/18
vSeeds.emplace_back("185.203.119.194"); // GlobalToken Hardfork node: 08/18
vSeeds.emplace_back("185.203.119.195"); // GlobalToken Hardfork node: 09/18
vSeeds.emplace_back("185.206.144.201"); // GlobalToken Hardfork node: 10/18
vSeeds.emplace_back("185.141.62.86"); // GlobalToken Hardfork node: 11/18
vSeeds.emplace_back("185.141.62.87"); // GlobalToken Hardfork node: 12/18
vSeeds.emplace_back("185.141.62.88"); // GlobalToken Hardfork node: 13/18
vSeeds.emplace_back("185.141.62.89"); // GlobalToken Hardfork node: 14/18
vSeeds.emplace_back("185.141.62.90"); // GlobalToken Hardfork node: 15/18
vSeeds.emplace_back("185.141.62.91"); // GlobalToken Hardfork node: 16/18
vSeeds.emplace_back("185.141.62.92"); // GlobalToken Hardfork node: 17/18
vSeeds.emplace_back("185.203.118.117"); // GlobalToken Hardfork node: 18/18

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,38);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
Expand All @@ -228,21 +255,22 @@ class CMainParams : public CChainParams {
checkpointData = {
{
{ 0, uint256S("0x00000000fe3e3e93344a6b73888137397413eb11f601b4231b5196390d24d3b6")},
{ 253, uint256S("0x000000000001a9597538194df736eda73c35c17d78ec14ac99b9d392d0892ce3")},
{ 44446, uint256S("0x000000000004ddd47d2e6033af4d034e63171d61e4eaca2702f9e8b9a8ffdb5a")},
{ 87757, uint256S("0x000000000001356d0e351660b8356f8f6a12a5b029b2c10a5b47d753b8cd8f29")},
{174987, uint256S("0x0000000000004a80520dfce6d2017d6f403a9def13fe99629d31f6b7a90b7c31")},
{214590, uint256S("0x00000000000003886a3080ff818eb6027a98f1ac33c532b730fbe4c0fde704ca")},
{282595, uint256S("0x00000000000000e335a60ca393eee3445f551d5bf6987e47d3a70e043b8dff5b")},
{ 253, uint256S("0x000000000001a9597538194df736eda73c35c17d78ec14ac99b9d392d0892ce3")},
{ 44446, uint256S("0x000000000004ddd47d2e6033af4d034e63171d61e4eaca2702f9e8b9a8ffdb5a")},
{ 87757, uint256S("0x000000000001356d0e351660b8356f8f6a12a5b029b2c10a5b47d753b8cd8f29")},
{174987, uint256S("0x0000000000004a80520dfce6d2017d6f403a9def13fe99629d31f6b7a90b7c31")},
{214590, uint256S("0x00000000000003886a3080ff818eb6027a98f1ac33c532b730fbe4c0fde704ca")},
{282595, uint256S("0x00000000000000e335a60ca393eee3445f551d5bf6987e47d3a70e043b8dff5b")},
{300000, uint256S("0x00000000000000c22e9be2faab7b2f05b0e834f434b0a82b0a12b55351b9d3c4")},
}
};

chainTxData = ChainTxData{
// Data as of block 0000000000000069c70702db06f86040268d0fdbfbf86b80ce35caa1dc9893c8 (height 282590).
1516650620, // * UNIX timestamp of last known number of transactions
343863, // * total number of transactions between genesis and that timestamp
// Data as of block 000000000000007ec4f3626d60d50098ba6d6a91981d0267ecb5848bbc2a2002 (height 305029).
1537097666, // * UNIX timestamp of last known number of transactions
369384, // * total number of transactions between genesis and that timestamp
// (the tx=... number in the SetBestChain debug.log lines)
0.0045 // * estimated number of transactions per second after that timestamp
0.0019 // * estimated number of transactions per second after that timestamp
};

// Founders reward script expects a vector of 4-of-6 multisig addresses
Expand Down Expand Up @@ -627,6 +655,26 @@ class CTestNetParams : public CChainParams {
// nodes with support for servicebits filtering should be at the top

vSeeds.emplace_back("134.255.221.7");
vSeeds.emplace_back("lameserver.de"); // GlobalToken Node by Astrali
// Hardfork Seednodes
vSeeds.emplace_back("185.206.144.200"); // GlobalToken Hardfork node: 01/18
vSeeds.emplace_back("185.206.145.201"); // GlobalToken Hardfork node: 02/18
vSeeds.emplace_back("185.206.146.200"); // GlobalToken Hardfork node: 03/18
vSeeds.emplace_back("185.206.147.203"); // GlobalToken Hardfork node: 04/18
vSeeds.emplace_back("185.205.209.67"); // GlobalToken Hardfork node: 05/18
vSeeds.emplace_back("185.206.147.202"); // GlobalToken Hardfork node: 06/18
vSeeds.emplace_back("185.205.209.137"); // GlobalToken Hardfork node: 07/18
vSeeds.emplace_back("185.203.119.194"); // GlobalToken Hardfork node: 08/18
vSeeds.emplace_back("185.203.119.195"); // GlobalToken Hardfork node: 09/18
vSeeds.emplace_back("185.206.144.201"); // GlobalToken Hardfork node: 10/18
vSeeds.emplace_back("185.141.62.86"); // GlobalToken Hardfork node: 11/18
vSeeds.emplace_back("185.141.62.87"); // GlobalToken Hardfork node: 12/18
vSeeds.emplace_back("185.141.62.88"); // GlobalToken Hardfork node: 13/18
vSeeds.emplace_back("185.141.62.89"); // GlobalToken Hardfork node: 14/18
vSeeds.emplace_back("185.141.62.90"); // GlobalToken Hardfork node: 15/18
vSeeds.emplace_back("185.141.62.91"); // GlobalToken Hardfork node: 16/18
vSeeds.emplace_back("185.141.62.92"); // GlobalToken Hardfork node: 17/18
vSeeds.emplace_back("185.203.118.117"); // GlobalToken Hardfork node: 18/18

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
Expand All @@ -651,14 +699,16 @@ class CTestNetParams : public CChainParams {
checkpointData = {
{
{0, uint256S("00000000fe3e3e93344a6b73888137397413eb11f601b4231b5196390d24d3b6")},
{1000, uint256S("00000000001f423e19a5ce9d10a1263dfbd83654da9183c25f7fcfd7fc25e458")},
{2152, uint256S("000000002439acbc366328335e435f25e78ff1f884fabd00f359a66c7865a1f2")},
}
};

chainTxData = ChainTxData{
// Data as of block 00000000fe3e3e93344a6b73888137397413eb11f601b4231b5196390d24d3b6 (height 0)
// Data as of block 000000002439acbc366328335e435f25e78ff1f884fabd00f359a66c7865a1f2 (height 2152)
1480961109,
1,
1
2212,
0.000541
};

vFoundersRewardAddress = {
Expand Down Expand Up @@ -1395,6 +1445,8 @@ unsigned int CChainParams::EquihashSolutionWidth(uint8_t nAlgo) const
return EhSolutionWidth(EquihashN(), EquihashK());
else if(nAlgo == ALGO_ZHASH)
return EhSolutionWidth(ZhashN(), ZhashK());
else
return 0;
}

void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
Expand Down
4 changes: 4 additions & 0 deletions src/chainparams.h
@@ -1,5 +1,9 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2016-2017 The Zcash developers
// Copyright (c) 2018 The Bitcoin Private developers
// Copyright (c) 2017-2018 The Bitcoin Gold developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
2 changes: 2 additions & 0 deletions src/consensus/params.h
@@ -1,5 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/crypto/algos/blake/hashblake.h
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
6 changes: 4 additions & 2 deletions src/crypto/algos/equihash/equihash.cpp
Expand Up @@ -443,8 +443,9 @@ bool Equihash<N,K>::BasicSolve(const eh_HashState& base_state,
i += j;
if (cancelled(FinalColliding)) throw solver_cancelled;
}
} else
} else {
LogPrint(BCLog::POW, "- List is empty\n");
}

return false;
}
Expand Down Expand Up @@ -627,8 +628,9 @@ bool Equihash<N,K>::OptimisedSolve(const eh_HashState& base_state,
i += j;
if (cancelled(FinalColliding)) throw solver_cancelled;
}
} else
} else {
LogPrint(BCLog::POW, "- List is empty\n");
}

} // Ensure Xt goes out of scope and is destroyed

Expand Down
8 changes: 5 additions & 3 deletions src/crypto/algos/hashlib/multihash.h
@@ -1,12 +1,15 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The DigiByte developers
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2016-2018 The CryptoCoderz Team / Espers
// Copyright (c) 2017-2018 The AmsterdamCoin developers
// Copyright (c) 2017 The Raven Core developers
// Copyright (c) 2014-2017 The Mun Core developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

// some parts are from dash's hash.h

#ifndef MULTIHASH_H
#define MULTIHASH_H

Expand Down Expand Up @@ -1741,7 +1744,6 @@ inline uint256 JeongHash(const T1 pbegin, const T1 pend)
sph_sha512_context ctx_sha2;
sph_whirlpool_context ctx_whirlpool;
sph_skein512_context ctx_skein;
sph_gost512_context ctx_gost;

static unsigned char pblank[1];
uint512 hash[24];
Expand Down
1 change: 1 addition & 0 deletions src/init.cpp
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2017-2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
Expand Down
2 changes: 2 additions & 0 deletions src/instantx.cpp
Expand Up @@ -900,6 +900,8 @@ int CInstantSend::GetTransactionLockSignatures(const uint256& txHash)
return -1;
}

// Not used in GLT Source Code
// It was part of the Governance System in DASH, but could be useful in the future.
int CInstantSend::GetConfirmations(const uint256 &nTXHash)
{
return IsLockedInstantSendTransaction(nTXHash) ? nInstantSendDepth : 0;
Expand Down
9 changes: 0 additions & 9 deletions src/masternodeman.cpp
Expand Up @@ -1662,15 +1662,6 @@ void CMasternodeMan::WarnMasternodeDaemonUpdates()

void CMasternodeMan::NotifyMasternodeUpdates(CConnman& connman)
{
// Avoid double locking
bool fMasternodesAddedLocal = false;
bool fMasternodesRemovedLocal = false;
{
LOCK(cs);
fMasternodesAddedLocal = fMasternodesAdded;
fMasternodesRemovedLocal = fMasternodesRemoved;
}

LOCK(cs);
fMasternodesAdded = false;
fMasternodesRemoved = false;
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Expand Up @@ -2263,7 +2263,7 @@ void CConnman::SetNetworkActive(bool active)
uiInterface.NotifyNetworkActiveChanged(fNetworkActive);
}

CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In) : nSeed0(nSeed0In), nSeed1(nSeed1In), addrman(Params().AllowMultiplePorts())
CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In) : addrman(Params().AllowMultiplePorts()), nSeed0(nSeed0In), nSeed1(nSeed1In)
{
fNetworkActive = true;
setBannedIsDirty = false;
Expand Down
2 changes: 1 addition & 1 deletion src/net_processing.cpp
Expand Up @@ -2282,7 +2282,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr

if (!AlreadyHave(inv) &&
AcceptToMemoryPool(mempool, state, ptx, &fMissingInputs, &lRemovedTxn, false /* bypass_limits */, 0 /* nAbsurdFee */)) {

// Process custom txes, this changes AlreadyHave to "true"
if (strCommand == NetMsgType::TXLOCKREQUEST) {
LogPrintf("TXLOCKREQUEST -- Transaction Lock Request accepted, txid=%s, peer=%d\n",
tx.GetHash().ToString(), pfrom->GetId());
Expand Down
1 change: 1 addition & 0 deletions src/pow.cpp
@@ -1,6 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2016-2017 The Zcash developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
1 change: 1 addition & 0 deletions src/pow.h
@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2018 The Globaltoken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/primitives/block_dependencies.cpp
@@ -1,4 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
1 change: 1 addition & 0 deletions src/primitives/block_dependencies.h
@@ -1,4 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
7 changes: 7 additions & 0 deletions src/primitives/mining_block.cpp
@@ -1,5 +1,12 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2013-2014 Phoenixcoin Developers
// Copyright (c) 2016-2018 The CryptoCoderz Team / Espers
// Copyright (c) 2017-2018 The AmsterdamCoin developers
// Copyright (c) 2009-2016 The Litecoin Core developers
// Copyright (c) 2014-2017 The Mun Core developers
// Copyright (c) 2017 The Raven Core developers
// Copyright (c) 2018 The GlobalToken Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
1 change: 1 addition & 0 deletions src/primitives/pureheader.cpp
@@ -1,4 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down
1 change: 1 addition & 0 deletions src/primitives/pureheader.h
@@ -1,4 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The DigiByte Core developers
// Copyright (c) 2009-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand Down

0 comments on commit 91da8f2

Please sign in to comment.