Skip to content

Commit

Permalink
Merge pull request #16 from LIMXTEC/DEV_1
Browse files Browse the repository at this point in the history
Dev 1
  • Loading branch information
limxdev authored May 31, 2020
2 parents 701cf69 + 15bf246 commit 512c36c
Show file tree
Hide file tree
Showing 27 changed files with 340 additions and 670 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ cache:
- $HOME/.ccache
git:
depth: false # full clone for git subtree check, this works around issue #12388

stages:
- lint
- test
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 9)
define(_CLIENT_VERSION_REVISION, 9)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
33 changes: 17 additions & 16 deletions contrib/seeds/nodes_main.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# List of fixed seed nodes for mainnet

80.211.195.230:9468
194.182.84.184:9468
81.2.239.169:9468
80.211.219.25:9468
185.28.101.48:9468
80.211.139.4:9468
80.211.0.105:9468
94.177.217.18:9468
[2001:15e8:110:42e6::1]:9468
[2001:15e8:110:73b8::1]:9468
[2001:15e8:110:7a9::1]:9468
[2001:15e8:110:5a19::1]:9468
[2001:15e8:110:2930::1]:9468
[2a00:6d40:72:3404::1]:9468
[2a00:6d40:72:6f69::1]:9468
[2a00:6d40:60:b412::1]:9468

112.12.186.167:7951
120.243.237.99:7951
144.76.172.181:7951
178.200.230.252:7951
185.194.140.60:7951
185.194.142.122:7951
185.194.142.125:7951
188.68.39.1:7951
188.86.152.151:7951
200.44.250.123:7951
27.42.139.210:7951
27.42.173.41:7951
27.42.187.69:7951
37.120.186.85:7951
37.120.190.76:7951
37.201.4.195:7951
1 change: 1 addition & 0 deletions contrib/verify-commits/trusted-git-root
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
82bcf405f6db1d55b684a1f63a4aabad376cdad7
9505C11C26DE91E28AED1ADB111707CDB9079D6A
5 changes: 1 addition & 4 deletions contrib/verify-commits/trusted-keys
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
71A3B16735405025D447E8F274810B012346C9A6
133EAC179436F14A5CF1B794860FEB804E669320
32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC
B8B3F1C0E58C15DB6A81D30C3648A882F4316B9B
9505C11C26DE91E28AED1ADB111707CDB9079D6A
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ crypto_libbitcoin_crypto_shani_a_CPPFLAGS += -DENABLE_SHANI
crypto_libbitcoin_crypto_shani_a_SOURCES = crypto/sha256_shani.cpp

# consensus: shared between all executables that validate any consensus rules.
libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(LIBTOOL_LDFLAGS)
libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_consensus_a_SOURCES = \
amount.h \
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ RES_IMAGES = \
qt/res/images/megacoin_logo_horizontal.png \
qt/res/images/megacoin_main_hgB.png

RES_CSS = qt/res/css/megacoin_main.css

RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png)

BITCOIN_RC = qt/res/bitcoin-qt-res.rc
Expand Down
35 changes: 17 additions & 18 deletions src/arith_uint256.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Copyright (c) 2019 Megacoin 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 @@ -291,27 +290,27 @@ arith_uint256 UintToArith256(const uint256 &);

// Megacoin
/** 512-bit unsigned integer */
class arith_uint512
class arith_uint512
{
protected:
enum { WIDTH = 512 / 32 };
uint32_t pn[WIDTH];
enum { WIDTH = 512 / 32 };
uint32_t pn[WIDTH];

public:
arith_uint512()
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
}

arith_uint256 trim256() const
{
arith_uint256 ret;
for (unsigned int i = 0; i < arith_uint256::WIDTH; i++) {
ret.pn[i] = pn[i];
}
return ret;
}
arith_uint512()
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
}

arith_uint256 trim256() const
{
arith_uint256 ret;
for (unsigned int i = 0; i < arith_uint256::WIDTH; i++) {
ret.pn[i] = pn[i];
}
return ret;
}
};

#endif // MEGACOIN_ARITH_UINT256_H
5 changes: 4 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1525132800; // 05/01/2018 @ 12:00am (UTC)
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1746057600; // 05/01/2025 @ 12:00am (UTC)
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nHeight = 1280000;

// Deployment of BIP68, BIP112, and BIP113.
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1525132800; // 05/01/2018 @ 12:00am (UTC)
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1746057600; // 05/01/2025 @ 12:00am (UTC)

consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nHeight = 1280000;

// FXTC TODO:
// Dash
// Deployment of DIP0001
Expand All @@ -139,6 +141,7 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1525132800; // 05/01/2018 @ 12:00am (UTC)
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1746057600; // 05/01/2025 @ 12:00am (UTC)
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nHeight = 1280000;

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000005dfab1790ba9fdd"); // Megacoin
Expand Down
4 changes: 4 additions & 0 deletions src/consensus/consensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ static const int COINBASE_MATURITY = 100;
static const int COINBASE_MATURITY_2 = 4032; // One Week
/**Algoswitch Megacoin */
static const unsigned int HASH_FORK_TIME_1 = 1588842000; //05/07/2020 @ 9:00am (UTC)
static const unsigned int HASH_FORK_TIME_2 = 1591131463;
static const unsigned int SKIPP_NBITS = 1257000;
static const unsigned int UNEXPECTED_WITNESS = 1500000;
static const unsigned int FORK_MATURITY_2 = 1260800; //Not used

static const int WITNESS_SCALE_FACTOR = 4;

Expand Down
1 change: 1 addition & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct BIP9Deployment {
int64_t nStartTime;
/** Timeout/expiry MedianTime for the deployment attempt. */
int64_t nTimeout;
int64_t nHeight;

// Dash
/** The number of past blocks (including the block under consideration) to be taken into account for locking in a fork. */
Expand Down
4 changes: 2 additions & 2 deletions src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
// if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY) {
// MEC BEGIN
// BTX BEGIN
if (AHeight < 1253800)
if (AHeight < 1260800)
{
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY)
{
Expand All @@ -239,7 +239,7 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
}
else
{
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (!sporkManager.IsSporkActive(SPORK_MEGACOIN_15_COINBASE_MATURITY_STAGE_2)? COINBASE_MATURITY : COINBASE_MATURITY_2 ))
if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY_2 )
{
return state.Invalid(false,
REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/gost_streebog.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* @author Mish <[email protected]>
*/

#ifndef SPH_GOST_H__
#define SPH_GOST_H__
#ifndef MEGACOIN_CRYPTO_GOST_STREEBOG_H
#define MEGACOIN_CRYPTO_GOST_STREEBOG_H

#ifdef __cplusplus
extern "C"{
Expand Down Expand Up @@ -182,4 +182,4 @@ void sph_gost512_addbits_and_close(
}
#endif

#endif
#endif //MEGACOIN_CRYPTO_GOST_STREEBOG_H
Loading

0 comments on commit 512c36c

Please sign in to comment.