Skip to content

Commit

Permalink
Merge pull request #33 from NewYorkCoin-NYC/v1.3.1
Browse files Browse the repository at this point in the history
V1.3.1
  • Loading branch information
MrSlosh authored Aug 24, 2018
2 parents 3760fac + 01f4ce0 commit 18a1452
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 33 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ WORKDIR /work
# Install configuration
#

RUN mkdir -p /root/.newyorkcoin
RUN mkdir -p /root/.newyorkc

# ===============================================================================
# System Initialization
Expand All @@ -62,13 +62,12 @@ RUN mkdir -p /root/.newyorkcoin
## Copy folders
RUN git clone https://github.com/NewYorkCoin-NYC/nycoin.git /work
RUN cd /work && \
git checkout v1.3 && \
chmod a+x autogen.sh && \
./autogen.sh && \
./configure && \
/usr/bin/make

# Set default CMD
CMD /work/src/newyorkcoind && tail -f -n 10 /root/.newyorkcoin/debug.log
CMD /work/src/newyorkcoind && tail -f -n 10 /root/.newyorkc/debug.log

EXPOSE 17020 27020 18823 2882
EXPOSE 17020 27020 18823 28823
2 changes: 1 addition & 1 deletion configure.ac
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, 3)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 13)
define(_CLIENT_VERSION_BUILD, 17)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([NewYorkCoin],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/NewYorkCoin-NYC/nycoin/issues],[newyorkcoin])
Expand Down
23 changes: 7 additions & 16 deletions docker/mainnet/newyorkcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,17 @@ maxconnections=200

port=17020

rpcallowip=*
rpcallowip=0.0.0.0/0
rpcuser=nycuser
rpcpassword=S3cR3t-P4ss

rpcport=18823

addnode=62.213.218.23
addnode=67.86.78.250
addnode=71.34.149.166
addnode=71.68.213.80
addnode=73.54.142.171
addnode=76.95.178.229
addnode=82.251.255.101
addnode=141.126.150.52
addnode=157.161.128.51
addnode=163.172.222.175
addnode=170.247.210.88
addnode=173.56.27.29
addnode=174.66.176.135
addnode=207.38.237.43
addnode=209.122.196.148
addnode=nyc.theincrediblemachine.tv
addnode=62.213.218.8
addnode=72.229.232.216
addnode=46.4.102.69
addnode=88.99.2.95
addnode=39.116.239.43
addnode=158.69.246.121
addnode=67.85.83.129
5 changes: 2 additions & 3 deletions docker/testnet/newyorkcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ debug=1
testnet=1
port=27020

rpcallowip=*
rpcallowip=0.0.0.0/0
rpcuser=nycuser
rpcpassword=S3cR3t-P4ss

rpcport=28823

addnode=104.183.139.17:27020
addnode=62.213.218.8:27020
addnode=62.213.218.8:28020
addnode=62.213.218.23:27020
13 changes: 9 additions & 4 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,17 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)

const Consensus::Params& consensusParams = chainparams.GetConsensus(nHeight);
/* Initialise the block version. */
if(nHeight < consensusParams.nHeightEffective)
pblock->nVersion = 1;
if(consensusParams.fAllowLegacyBlocks)
pblock->nVersion = CBlockHeader::LEGACY_VERSION;
else
pblock->nVersion = 3;
{
pblock->nVersion = CBlockHeader::CURRENT_VERSION;

}
pblock->nVersion.SetChainId(chainparams.GetConsensus(0).nAuxpowChainId);



// -regtest only: allow overriding block.nVersion with
// -blockversion=N to test forking scenarios
if (Params().MineBlocksOnDemand())
Expand Down Expand Up @@ -348,7 +353,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
// Fill in header
pblock->hashPrevBlock = pindexPrev->GetBlockHash();
UpdateTime(pblock, consensus, pindexPrev);
if(pblock->nVersion == 1)
if(consensusParams.fAllowLegacyBlocks)
pblock->nBits = GetNextWorkRequiredLegacy(pindexPrev, pblock, consensus);
else
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensus);
Expand Down
6 changes: 1 addition & 5 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ unsigned int KimotoGravityWell(const CBlockIndex* pindexLast, const CBlockHeader

unsigned int bnProofOfWorkLimit = UintToArith256(params.powLimit).GetCompact();
CBigNum bnPowLimit(UintToArith256(params.powLimit));
// if we are mining legacy testnet, return proof of work limit
// if (params.fPowAllowMinDifficultyBlocks)
// {
// return bnProofOfWorkLimit;
// }


if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || (uint64_t)BlockLastSolved->nHeight < PastBlocksMin) { return UintToArith256(params.powLimit).GetCompact(); }

Expand Down
2 changes: 2 additions & 0 deletions src/primitives/pureheader.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class CBlockVersion
|| (nVersion == 2 && GetChainId() == 0);
}


CBlockVersion& operator=(const CBlockVersion& other)
{
nVersion = other.nVersion;
Expand Down Expand Up @@ -147,6 +148,7 @@ class CPureBlockHeader
public:
// header
static const int32_t CURRENT_VERSION = 3;
static const int32_t LEGACY_VERSION = 1;
CBlockVersion nVersion;
uint256 hashPrevBlock;
uint256 hashMerkleRoot;
Expand Down

0 comments on commit 18a1452

Please sign in to comment.