From 9d9d5f50ab797d75818d0a051e73b21d36031bf4 Mon Sep 17 00:00:00 2001 From: bitcoinnano Date: Tue, 9 Jan 2018 11:21:55 +0800 Subject: [PATCH] solve block height mismatch when reindexing, add copyright and license statements --- src/chainparams.cpp | 4 ++-- src/pow/nano.cpp | 7 +++++++ src/rpc/server.cpp | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b4fe280..2db40ef 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -130,8 +130,8 @@ class CMainParams : public CChainParams { strNetworkID = "main"; consensus.nSubsidySlowStartInterval = 4370; // slow start mining in roughly a month consensus.nSubsidyHalvingInterval = 210000; - consensus.BIP34Height = 0; - consensus.BIP34Hash = uint256S("0x0000df4314780c0ea37b77eeccbc184330707b95bc0c080f2c4707d642f12a04"); + consensus.BIP34Height = 1; + consensus.BIP34Hash = uint256S("0x0001581d802a414be66618e6ae6fbc39f5d616221ec2f9ea3d1f469fc08fc298"); consensus.BIP65Height = 0; consensus.BIP66Height = 0; consensus.antiReplayOpReturnSunsetHeight = 530000; diff --git a/src/pow/nano.cpp b/src/pow/nano.cpp index af22c2d..0a04e2f 100644 --- a/src/pow/nano.cpp +++ b/src/pow/nano.cpp @@ -1,3 +1,9 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2017-2018 The Bitcoin Nano developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "miner.h" #include "arith_uint256.h" #include "pow/tromp/equi_miner.h" @@ -12,6 +18,7 @@ #include "arith_uint256.h" #include +// partly copied from https://github.com/zcash/zcash/blob/master/src/miner.cpp#L581 bool equihash_(std::string solver, CBlock *pblock, int n, int k) { arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 78078a0..b8779d7 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -229,7 +229,7 @@ static UniValue help(Config &config, const JSONRPCRequest &jsonRequest) { "\nArguments:\n" "1. \"command\" (string, optional) The command to get help on\n" "\nResult:\n" - "\"text\" (string 2018/1/1) The help text\n"); + "\"text\" (string 2018/1/9) The help text\n"); std::string strCommand; if (jsonRequest.params.size() > 0)