From 08344c735feddc8d6cbeb63b18f3fc1fd4544170 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 2 Aug 2012 10:09:29 +0200 Subject: [PATCH 01/13] fix further spelling errors / remove a tab in the source --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 4d016956e66..b3c49f3a63a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -256,7 +256,7 @@ bool AppInit2(int argc, char* argv[]) // Remove tabs strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end()); #if defined(QT_GUI) && defined(WIN32) - // On windows, show a message box, as there is no stderr + // On Windows, show a message box, as there is no stderr wxMessageBox(strUsage, "Usage"); #else fprintf(stderr, "%s", strUsage.c_str()); From 4e56a62f720282a083b2f8481b8250453dfc739f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 6 Aug 2012 21:52:44 +0200 Subject: [PATCH 02/13] Return !0 when qt tests fail. --- src/qt/test/test_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 5b11e39ea37..af2d358fc47 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -6,6 +6,11 @@ // This is all you need to run all the tests int main(int argc, char *argv[]) { + bool fInvalid = false; + URITests test1; - QTest::qExec(&test1); + if (QTest::qExec(&test1) != 0) + fInvalid = true; + + return fInvalid; } From 94db8f97d4a2d9bc8e1f90867630b624367d5b4b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 7 Aug 2012 16:43:58 +0200 Subject: [PATCH 03/13] Fix Win32 compiling of qt/test/uritests.cpp --- src/qt/test/uritests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp index a281c39ca56..4662f5ed31c 100644 --- a/src/qt/test/uritests.cpp +++ b/src/qt/test/uritests.cpp @@ -47,7 +47,7 @@ void URITests::uriTests() uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=100&label=Wikipedia Example")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); - QVERIFY(rv.amount == 10000000000); + QVERIFY(rv.amount == 10000000000LL); QVERIFY(rv.label == QString("Wikipedia Example")); uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address")); From f51b175e3c9f7326267ca0eef0dd8ae2f28b4fad Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 17 Aug 2012 10:35:51 +0200 Subject: [PATCH 04/13] fix a compiler sign warning in OpenBlockFile() --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index ef59d31f9a8..9e1b228b2ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1705,7 +1705,7 @@ FILE* AppendBlockFile(unsigned int& nFileRet) if (fseek(file, 0, SEEK_END) != 0) return NULL; // FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB - if (ftell(file) < 0x7F000000 - MAX_SIZE) + if (ftell(file) < (long)(0x7F000000 - MAX_SIZE)) { nFileRet = nCurrentBlockFile; return file; From 5ebc1680062f6e6fc6352c4c8ccb1f746f6a280e Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 8 Jun 2012 16:36:40 +0000 Subject: [PATCH 05/13] Bugfix: Make USE_UPNP=- work with makefile.{linux-mingw,mingw,osx} too --- src/makefile.linux-mingw | 5 ++++- src/makefile.mingw | 5 ++++- src/makefile.osx | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index fa46d080bb1..41dbf2a9fc0 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -53,7 +53,10 @@ HEADERS = \ wallet.h -ifdef USE_UPNP +ifndef USE_UPNP + override USE_UPNP = - +endif +ifneq (${USE_UPNP}, -) LIBPATHS += -L"$(DEPSDIR)/miniupnpc" LIBS += -l miniupnpc -l iphlpapi DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) diff --git a/src/makefile.mingw b/src/makefile.mingw index 5e9a4427f14..75d3992f8ae 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -49,7 +49,10 @@ HEADERS = \ util.h \ wallet.h -ifdef USE_UPNP +ifndef USE_UPNP + override USE_UPNP = - +endif +ifneq (${USE_UPNP}, -) INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw" LIBPATHS += -L"C:\miniupnpc-1.6-mgw" LIBS += -l miniupnpc -l iphlpapi diff --git a/src/makefile.osx b/src/makefile.osx index cbd51b049f0..5e9236fd739 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -91,7 +91,10 @@ OBJS= \ obj/util.o \ obj/wallet.o -ifdef USE_UPNP +ifndef USE_UPNP + override USE_UPNP = - +endif +ifneq (${USE_UPNP}, -) DEFS += -DUSE_UPNP=$(USE_UPNP) ifdef STATIC LIBS += $(DEPSDIR)/lib/libminiupnpc.a From a259baa9557af63cca220802ee45be4f4b54ac90 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 13 May 2012 15:41:00 +0200 Subject: [PATCH 06/13] update some strings used as warning messages in sendcoinsdialog.cpp --- src/qt/sendcoinsdialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index b27efc24b7b..2a2c6062fa4 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -125,28 +125,28 @@ void SendCoinsDialog::on_sendButton_clicked() break; case WalletModel::AmountExceedsBalance: QMessageBox::warning(this, tr("Send Coins"), - tr("Amount exceeds your balance"), + tr("The amount exceeds your balance."), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::AmountWithFeeExceedsBalance: QMessageBox::warning(this, tr("Send Coins"), - tr("Total exceeds your balance when the %1 transaction fee is included"). + tr("The total exceeds your balance when the %1 transaction fee is included."). arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, sendstatus.fee)), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::DuplicateAddress: QMessageBox::warning(this, tr("Send Coins"), - tr("Duplicate address found, can only send to each address once in one send operation"), + tr("Duplicate address found, can only send to each address once per send operation."), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::TransactionCreationFailed: QMessageBox::warning(this, tr("Send Coins"), - tr("Error: Transaction creation failed "), + tr("Error: Transaction creation failed."), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::TransactionCommitFailed: QMessageBox::warning(this, tr("Send Coins"), - tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."), + tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::Aborted: // User aborted, nothing to do From b958999af17473300e5b3cd26bd16997e21dd644 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 3 Jul 2012 17:30:43 +0200 Subject: [PATCH 07/13] Work around a distcc bug where -MMD output isn't copied. --- src/makefile.osx | 4 ++-- src/makefile.unix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/makefile.osx b/src/makefile.osx index 5e9236fd739..449ff89748c 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -111,7 +111,7 @@ all: bitcoind -include obj-test/*.P obj/nogui/%.o: %.cpp - $(CXX) -c $(CFLAGS) -MMD -o $@ $< + $(CXX) -c $(CFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ @@ -121,7 +121,7 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%) $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) obj/test/%.o: test/%.cpp - $(CXX) -c $(TESTDEFS) $(CFLAGS) -MMD -o $@ $< + $(CXX) -c $(TESTDEFS) $(CFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ diff --git a/src/makefile.unix b/src/makefile.unix index e75dda514fa..a6492f5361a 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -132,7 +132,7 @@ all: bitcoind -include obj-test/*.P obj/nogui/%.o: %.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< + $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ @@ -142,7 +142,7 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%) $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) obj-test/%.o: test/%.cpp - $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $< + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ From d710ed5b637ab8a4fca433b9b6d331c1e4b97908 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Wed, 27 Jun 2012 12:43:19 -0400 Subject: [PATCH 08/13] Add CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION constants. Partial of upstream dae3e10a5abe93833c57183b7c00f1db9200f46e --- src/main.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index 4edea5ed46e..8f9e07f7a82 100644 --- a/src/main.h +++ b/src/main.h @@ -396,6 +396,7 @@ typedef std::map > MapPrevTx; class CTransaction { public: + static const int CURRENT_VERSION=1; int nVersion; std::vector vin; std::vector vout; @@ -418,7 +419,7 @@ public: void SetNull() { - nVersion = 1; + nVersion = CTransaction::CURRENT_VERSION; vin.clear(); vout.clear(); nLockTime = 0; @@ -830,6 +831,7 @@ class CBlock { public: // header + static const int CURRENT_VERSION=1; int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; @@ -868,7 +870,7 @@ public: void SetNull() { - nVersion = 1; + nVersion = CBlock::CURRENT_VERSION; hashPrevBlock = 0; hashMerkleRoot = 0; nTime = 0; From 9adab76e0ae07d33d661c7b51b8f89cbfb119870 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Wed, 27 Jun 2012 19:30:39 -0400 Subject: [PATCH 09/13] Block height in coinbase as a new block rule "Version 2" blocks are blocks that have nVersion=2 and have the block height as the first item in their coinbase. Block-height-in-the-coinbase is strictly enforced when version=2 blocks are a supermajority in the block chain (750 of the last 1,000 blocks on main net, 51 of 100 for testnet). This does not affect old clients/miners at all, which will continue producing nVersion=1 blocks, and which will continue to be valid. --- src/main.cpp | 28 +++++++++++++++++++++++++++- src/main.h | 8 +++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9e1b228b2ad..fc57713129b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1554,6 +1554,19 @@ bool CBlock::AcceptBlock() if (!Checkpoints::CheckBlock(nHeight, hash)) return error("AcceptBlock() : rejected by checkpoint lockin at %d", nHeight); + // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height + if (nVersion > 1) + { + // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet): + if ((!fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 750, 1000)) || + (fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 51, 100))) + { + CScript expect = CScript() << nHeight; + if (!std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin())) + return error("AcceptBlock() : block height mismatch in coinbase"); + } + } + // Write block to history file if (!CheckDiskSpace(::GetSerializeSize(*this, SER_DISK))) return error("AcceptBlock() : out of disk space"); @@ -1575,6 +1588,18 @@ bool CBlock::AcceptBlock() return true; } +bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired, unsigned int nToCheck) +{ + unsigned int nFound = 0; + for (unsigned int i = 0; i < nToCheck && nFound < nRequired && pstart != NULL; i++) + { + if (pstart->nVersion >= minVersion) + ++nFound; + pstart = pstart->pprev; + } + return (nFound >= nRequired); +} + bool static ProcessBlock(CNode* pfrom, CBlock* pblock) { // Check for duplicate @@ -3140,7 +3165,8 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& hashPrevBlock = pblock->hashPrevBlock; } ++nExtraNonce; - pblock->vtx[0].vin[0].scriptSig = CScript() << pblock->nTime << CBigNum(nExtraNonce); + unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2 + pblock->vtx[0].vin[0].scriptSig = CScript() << nHeight << CBigNum(nExtraNonce); pblock->hashMerkleRoot = pblock->BuildMerkleTree(); } diff --git a/src/main.h b/src/main.h index 8f9e07f7a82..8ca1afe6330 100644 --- a/src/main.h +++ b/src/main.h @@ -831,7 +831,7 @@ class CBlock { public: // header - static const int CURRENT_VERSION=1; + static const int CURRENT_VERSION=2; int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; @@ -1198,6 +1198,12 @@ public: return pindex->GetMedianTimePast(); } + /** + * Returns true if there are nRequired or more blocks of minVersion or above + * in the last nToCheck blocks, starting at pstart and going backwards. + */ + static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, + unsigned int nRequired, unsigned int nToCheck); std::string ToString() const From 2d57b561c212a7587aed895792b506807d3923c3 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Thu, 5 Jul 2012 21:22:16 -0400 Subject: [PATCH 10/13] Reject block.nVersion<=1 blocks if network has upgraded to version=2 If 950 of the last 1,000 blocks are nVersion=2, reject nVersion=1 (or zero, but no bitcoin release has created block.nVersion=0) blocks -- 75 of last 100 on testnet3. This rule is being put in place now so that we don't have to go through another "express support" process to get what we really want, which is for every single new block to include the block height in the coinbase. --- src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index fc57713129b..1821576dc55 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1554,8 +1554,17 @@ bool CBlock::AcceptBlock() if (!Checkpoints::CheckBlock(nHeight, hash)) return error("AcceptBlock() : rejected by checkpoint lockin at %d", nHeight); + // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded: + if (nVersion < 2) + { + if ((!fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 950, 1000)) || + (fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 75, 100))) + { + return error("AcceptBlock() : rejected nVersion=1 block"); + } + } // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height - if (nVersion > 1) + if (nVersion >= 2) { // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet): if ((!fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 750, 1000)) || From 52153a6e08df63ff19dd40b9119c6c010b1b1796 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sun, 26 Aug 2012 21:49:50 +0000 Subject: [PATCH 11/13] Minimal adaptations to getmemorypool for BIP 34 - As long as version 1 blocks are valid, provide them to getmemorypool clients (only) - Include BIP 22 "height" key in getmemorypool output --- src/bitcoinrpc.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index efc69a4e43e..9c9ff255d72 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1744,6 +1744,7 @@ Value getmemorypool(const Array& params, bool fHelp) " \"coinbasevalue\" : maximum allowable input to coinbase transaction, including the generation award and transaction fees\n" " \"time\" : timestamp appropriate for next block\n" " \"bits\" : compressed target of next block\n" + " \"height\" : height of the next block (backported, required by BIP 34)\n" "If [data] is specified, tries to solve the block and returns true if it was successful."); if (params.size() == 0) @@ -1779,6 +1780,12 @@ Value getmemorypool(const Array& params, bool fHelp) pblock = NULL; } pblock = CreateNewBlock(reservekey); + if (!((!fTestNet && CBlockIndex::IsSuperMajority(2, pindexBest, 950, 1000)) || + (fTestNet && CBlockIndex::IsSuperMajority(2, pindexBest, 75, 100)))) + { + // As long as version 1 blocks are valid at all, use them to be more compatible with old implementations + pblock->nVersion = 1; + } if (!pblock) throw JSONRPCError(-7, "Out of memory"); @@ -1814,6 +1821,7 @@ Value getmemorypool(const Array& params, bool fHelp) } uBits; uBits.nBits = htonl((int32_t)pblock->nBits); result.push_back(Pair("bits", HexStr(BEGIN(uBits.cBits), END(uBits.cBits)))); + result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); return result; } From bfe7cc638d1f6a11a030730130262e49eb6e7940 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 24 Aug 2012 14:47:54 +0200 Subject: [PATCH 12/13] Override progress bar on platforms with segmented progress bars Windows & WindowsXP style have a problem with displaying the block progress. Add a custom stylesheet as workaround, but only when one of those renderers is active, otherwise leave the theme alone (issue #1071). --- src/qt/bitcoingui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index f8e75174315..f444f3a1543 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -52,6 +52,7 @@ #include #include +#include #include @@ -141,6 +142,15 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): progressBar->setToolTip(tr("Block chain synchronization in progress")); progressBar->setVisible(false); + // Override style sheet for progress bar for styles that have a segmented progress bar, + // as they make the text unreadable (workaround for issue #1071) + // See https://qt-project.org/doc/qt-4.8/gallery.html + QString curStyle = qApp->style()->metaObject()->className(); + if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle") + { + progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }"); + } + statusBar()->addWidget(progressBarLabel); statusBar()->addWidget(progressBar); statusBar()->addPermanentWidget(frameBlocks); From bfd2ddfc47dc9157f919b3c21ce985121af1c61b Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 19 Jun 2012 15:48:29 -0400 Subject: [PATCH 13/13] Checkpoint at block 185333 (and remove a couple of intermediate checkpoints) --- src/checkpoints.cpp | 5 +---- src/test/Checkpoints_tests.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index ee74d259302..2d49f2b641f 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -23,14 +23,11 @@ namespace Checkpoints boost::assign::map_list_of ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d")) ( 33333, uint256("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6")) - ( 68555, uint256("0x00000000001e1b4903550a0b96e9a9405c8a95f387162e4944e8d9fbe501cd6a")) - ( 70567, uint256("0x00000000006a49b14bcf27462068f1264c961f11fa2e0eddd2be0791e1d4124a")) ( 74000, uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")) (105000, uint256("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97")) - (118000, uint256("0x000000000000774a7f8a7a12dc906ddb9e17e75d684f15e00f8767f9e8f36553")) (134444, uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe")) - (140700, uint256("0x000000000000033b512028abb90e1626d8b346fd0ed598ac0a3c371138dce2bd")) (168000, uint256("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763")) + (185333, uint256("0x00000000000002334c71b8706940c20348af897a9cfc0f1a6dab0d14d4ceb815")) ; bool CheckBlock(int nHeight, const uint256& hash) diff --git a/src/test/Checkpoints_tests.cpp b/src/test/Checkpoints_tests.cpp index 0d8a366d7ac..b14e9f70578 100644 --- a/src/test/Checkpoints_tests.cpp +++ b/src/test/Checkpoints_tests.cpp @@ -15,20 +15,20 @@ BOOST_AUTO_TEST_SUITE(Checkpoints_tests) BOOST_AUTO_TEST_CASE(sanity) { uint256 p11111 = uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"); - uint256 p140700 = uint256("0x000000000000033b512028abb90e1626d8b346fd0ed598ac0a3c371138dce2bd"); + uint256 p134444 = uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"); BOOST_CHECK(Checkpoints::CheckBlock(11111, p11111)); - BOOST_CHECK(Checkpoints::CheckBlock(140700, p140700)); + BOOST_CHECK(Checkpoints::CheckBlock(134444, p134444)); // Wrong hashes at checkpoints should fail: - BOOST_CHECK(!Checkpoints::CheckBlock(11111, p140700)); - BOOST_CHECK(!Checkpoints::CheckBlock(140700, p11111)); + BOOST_CHECK(!Checkpoints::CheckBlock(11111, p134444)); + BOOST_CHECK(!Checkpoints::CheckBlock(134444, p11111)); // ... but any hash not at a checkpoint should succeed: - BOOST_CHECK(Checkpoints::CheckBlock(11111+1, p140700)); - BOOST_CHECK(Checkpoints::CheckBlock(140700+1, p11111)); + BOOST_CHECK(Checkpoints::CheckBlock(11111+1, p134444)); + BOOST_CHECK(Checkpoints::CheckBlock(134444+1, p11111)); - BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 140700); + BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 134444); } BOOST_AUTO_TEST_SUITE_END()