From 93b5eff27427608d96c643d2f79ce490c2d705f1 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 7 May 2012 19:22:09 +0000 Subject: [PATCH 01/14] Bitcoin-Qt: Remove redundant tooltip on optional transaction fee. Fixes #1218 --- src/qt/optionsdialog.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 0025337a..e4b486a9 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -223,7 +223,6 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); fee_hbox->addWidget(fee_label); fee_edit = new BitcoinAmountField(); - fee_edit->setToolTip(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); fee_label->setBuddy(fee_edit); fee_hbox->addWidget(fee_edit); From 7515f00aa36e5650aaca5db911e80536514678be Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Tue, 8 May 2012 09:31:25 +0200 Subject: [PATCH 02/14] remove 2 ugly spaces from a string used in translations --- src/qt/optionsdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index e4b486a9..bac01829 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -214,7 +214,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): proxy_hbox->addStretch(1); layout->addLayout(proxy_hbox); - QLabel *fee_help = new QLabel(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); + QLabel *fee_help = new QLabel(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); fee_help->setWordWrap(true); layout->addWidget(fee_help); From dc15d56b2df25f5ea2e4d1d9b16a3f6578524035 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 11 May 2012 20:17:09 +0200 Subject: [PATCH 03/14] Properly escape " in strings when exporting CSV --- src/qt/csvmodelwriter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt/csvmodelwriter.cpp b/src/qt/csvmodelwriter.cpp index 84578b33..8a50bbab 100644 --- a/src/qt/csvmodelwriter.cpp +++ b/src/qt/csvmodelwriter.cpp @@ -27,8 +27,9 @@ void CSVModelWriter::addColumn(const QString &title, int column, int role) static void writeValue(QTextStream &f, const QString &value) { - // TODO: quoting if " or \n in string - f << "\"" << value << "\""; + QString escaped = value; + escaped.replace('"', "\"\""); + f << "\"" << escaped << "\""; } static void writeSep(QTextStream &f) From 10593f3be185dda058b4e2c48a3e77e4a2e00246 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 13 May 2012 00:16:50 +0200 Subject: [PATCH 04/14] remove string "TextLabel" from warningLabel, as this is unneeded and as such is a silly translation less to do :) --- src/qt/forms/askpassphrasedialog.ui | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qt/forms/askpassphrasedialog.ui b/src/qt/forms/askpassphrasedialog.ui index 3f6b668e..ff3a7716 100644 --- a/src/qt/forms/askpassphrasedialog.ui +++ b/src/qt/forms/askpassphrasedialog.ui @@ -28,9 +28,6 @@ - - TextLabel - Qt::RichText From c455aec6997ad9164f1083e93bb51095a25180cd Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 7 May 2012 21:36:30 +0200 Subject: [PATCH 05/14] Hopefully final fix for the stuck blockchain issue Immediately issue a "getblocks", instead of a "getdata" (which will trigger the relevant "inv" to be sent anyway), and only do so when the previous set of invs led us into a known and attached part of the block tree. --- src/main.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a2fc7387..0abba822 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2180,8 +2180,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) // find last block in inv vector unsigned int nLastBlock = (unsigned int)(-1); for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) { - if (vInv[vInv.size() - 1 - nInv].type == MSG_BLOCK) + if (vInv[vInv.size() - 1 - nInv].type == MSG_BLOCK) { nLastBlock = vInv.size() - 1 - nInv; + break; + } } CTxDB txdb("r"); for (int nInv = 0; nInv < vInv.size(); nInv++) @@ -2196,19 +2198,19 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (fDebug) printf(" got inventory: %s %s\n", inv.ToString().c_str(), fAlreadyHave ? "have" : "new"); - // Always request the last block in an inv bundle (even if we already have it), as it is the - // trigger for the other side to send further invs. If we are stuck on a (very long) side chain, - // this is necessary to connect earlier received orphan blocks to the chain again. - if (fAlreadyHave && nInv == nLastBlock) { - // bypass mapAskFor, and send request directly; it must go through. - std::vector vGetData(1,inv); - pfrom->PushMessage("getdata", vGetData); - } - if (!fAlreadyHave) pfrom->AskFor(inv); - else if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) + else if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) { pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(mapOrphanBlocks[inv.hash])); + } else if (nInv == nLastBlock) { + // In case we are on a very long side-chain, it is possible that we already have + // the last block in an inv bundle sent in response to getblocks. Try to detect + // this situation and push another getblocks to continue. + std::vector vGetData(1,inv); + pfrom->PushGetBlocks(mapBlockIndex[inv.hash], uint256(0)); + if (fDebug) + printf("force request: %s\n", inv.ToString().c_str()); + } // Track requests for our stuff Inventory(inv.hash); From 738592a002003246849e4b3102aebdab738e976a Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 14 May 2012 01:11:11 -0400 Subject: [PATCH 06/14] Always check return values of TxnBegin() and TxnCommit() PARTIAL, since d68dcf7 isn't backported (yet) --- src/main.cpp | 7 +++++-- src/rpc.cpp | 6 ++++-- src/wallet.cpp | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0abba822..abacbe5e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1336,7 +1336,9 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) { uint256 hash = GetHash(); - txdb.TxnBegin(); + if (!txdb.TxnBegin()) + return error("SetBestChain() : TxnBegin failed"); + if (pindexGenesisBlock == NULL && hash == hashGenesisBlock) { txdb.WriteHashBestChain(hash); @@ -1416,7 +1418,8 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) pindexNew->bnChainWork = (pindexNew->pprev ? pindexNew->pprev->bnChainWork : 0) + pindexNew->GetBlockWork(); CTxDB txdb; - txdb.TxnBegin(); + if (!txdb.TxnBegin()) + return false; txdb.WriteBlockIndex(CDiskBlockIndex(pindexNew)); if (!txdb.TxnCommit()) return false; diff --git a/src/rpc.cpp b/src/rpc.cpp index 8a02d95c..e2ae17e4 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -723,7 +723,8 @@ Value movecmd(const Array& params, bool fHelp) strComment = params[4].get_str(); CWalletDB walletdb(pwalletMain->strWalletFile); - walletdb.TxnBegin(); + if (!walletdb.TxnBegin()) + throw JSONRPCError(-20, "database error"); int64 nNow = GetAdjustedTime(); @@ -745,7 +746,8 @@ Value movecmd(const Array& params, bool fHelp) credit.strComment = strComment; walletdb.WriteAccountingEntry(credit); - walletdb.TxnCommit(); + if (!walletdb.TxnCommit()) + throw JSONRPCError(-20, "database error"); return true; } diff --git a/src/wallet.cpp b/src/wallet.cpp index b3eb06a3..6bf8e582 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -165,7 +165,8 @@ bool CWallet::EncryptWallet(const string& strWalletPassphrase) if (fFileBacked) { pwalletdbEncryption = new CWalletDB(strWalletFile); - pwalletdbEncryption->TxnBegin(); + if (!pwalletdbEncryption->TxnBegin()) + return false; pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey); } From c45c2c380de5a0591df94156367f057e37c41a09 Mon Sep 17 00:00:00 2001 From: R E Broadley Date: Thu, 17 May 2012 19:09:21 +0100 Subject: [PATCH 07/14] Add build directory to .gitignore, so that it's not tracked. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 66f93867..6ed527d5 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ qrc_*.cpp *.pro.user #mac specific .DS_Store +build From 334668cde4e63d08165aa95737cc95a00fbd252b Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 14 May 2012 07:49:17 +0200 Subject: [PATCH 08/14] remove 2 ugly spaces from a message string (PARTIAL of 966ae00) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index abacbe5e..510aca92 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1637,7 +1637,7 @@ bool CheckDiskSpace(uint64 nAdditionalBytes) if (nFreeBytesAvailable < (uint64)15000000 + nAdditionalBytes) { fShutdown = true; - string strMessage = _("Warning: Disk space is low "); + string strMessage = _("Warning: Disk space is low"); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION); From b2de28c74040595fa3fe5353ea063a8c3874f6b1 Mon Sep 17 00:00:00 2001 From: Fordy Date: Fri, 18 May 2012 22:02:28 +0800 Subject: [PATCH 09/14] Update License in File Headers I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file. --- src/base58.h | 2 +- src/bignum.h | 2 +- src/bitcoinrpc.cpp | 2 +- src/bitcoinrpc.h | 2 +- src/checkpoints.cpp | 2 +- src/checkpoints.h | 2 +- src/db.cpp | 2 +- src/db.h | 2 +- src/headers.h | 2 +- src/init.cpp | 2 +- src/init.h | 2 +- src/irc.cpp | 2 +- src/irc.h | 2 +- src/key.h | 2 +- src/keystore.cpp | 2 +- src/keystore.h | 2 +- src/main.cpp | 3 ++- src/main.h | 2 +- src/net.cpp | 2 +- src/net.h | 2 +- src/noui.h | 2 +- src/protocol.cpp | 2 +- src/protocol.h | 2 +- src/qtui.h | 2 +- src/script.cpp | 2 +- src/script.h | 2 +- src/serialize.h | 2 +- src/uint256.h | 2 +- src/util.cpp | 2 +- src/util.h | 2 +- src/wallet.cpp | 2 +- src/wallet.h | 2 +- 32 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/base58.h b/src/base58.h index d7fedb1a..d92054da 100644 --- a/src/base58.h +++ b/src/base58.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin Developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. // diff --git a/src/bignum.h b/src/bignum.h index fd5364e8..bd42f77c 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_BIGNUM_H #define BITCOIN_BIGNUM_H diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 2f42fae1..4003f525 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index f2674007..890975eb 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. void ThreadRPCServer(void* parg); int CommandLineRPC(int argc, char *argv[]); diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index f5ce0538..ee74d259 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include // for 'map_list_of()' #include diff --git a/src/checkpoints.h b/src/checkpoints.h index 9d52da40..e38b8b5f 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,6 +1,6 @@ // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CHECKPOINT_H #define BITCOIN_CHECKPOINT_H diff --git a/src/db.cpp b/src/db.cpp index db206c78..02b3327b 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/db.h b/src/db.h index 15bfb29c..8f6c42d7 100644 --- a/src/db.h +++ b/src/db.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_DB_H #define BITCOIN_DB_H diff --git a/src/headers.h b/src/headers.h index ea011c56..cef2718c 100644 --- a/src/headers.h +++ b/src/headers.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifdef _MSC_VER #pragma warning(disable:4786) diff --git a/src/init.cpp b/src/init.cpp index 168ebee6..5f1e4f53 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" #include "bitcoinrpc.h" diff --git a/src/init.h b/src/init.h index 4017f257..2086b313 100644 --- a/src/init.h +++ b/src/init.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_INIT_H #define BITCOIN_INIT_H diff --git a/src/irc.cpp b/src/irc.cpp index 5ac2306f..76157bd0 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "irc.h" diff --git a/src/irc.h b/src/irc.h index 6945b2ce..4fc071f0 100644 --- a/src/irc.h +++ b/src/irc.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_IRC_H #define BITCOIN_IRC_H diff --git a/src/key.h b/src/key.h index d096b394..4dc4914b 100644 --- a/src/key.h +++ b/src/key.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEY_H #define BITCOIN_KEY_H diff --git a/src/keystore.cpp b/src/keystore.cpp index 2e4de87a..7836ceda 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/keystore.h b/src/keystore.h index 8aaf3e64..87c84010 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEYSTORE_H #define BITCOIN_KEYSTORE_H diff --git a/src/main.cpp b/src/main.cpp index a5eac010..36871b5a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,8 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "headers.h" #include "checkpoints.h" #include "db.h" diff --git a/src/main.h b/src/main.h index 4b7e1948..f2350cfc 100644 --- a/src/main.h +++ b/src/main.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MAIN_H #define BITCOIN_MAIN_H diff --git a/src/net.cpp b/src/net.cpp index e92c659a..e1eea0d1 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "irc.h" diff --git a/src/net.h b/src/net.h index 5666805d..96e3680d 100644 --- a/src/net.h +++ b/src/net.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NET_H #define BITCOIN_NET_H diff --git a/src/noui.h b/src/noui.h index 0bbf45a7..4ba496bf 100644 --- a/src/noui.h +++ b/src/noui.h @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NOUI_H #define BITCOIN_NOUI_H diff --git a/src/protocol.cpp b/src/protocol.cpp index 16ad7468..3376c37e 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "protocol.h" #include "util.h" diff --git a/src/protocol.h b/src/protocol.h index c8723fa3..2d90bafe 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef __cplusplus # error This header can only be compiled as C++. diff --git a/src/qtui.h b/src/qtui.h index 193f8492..8f3e139e 100644 --- a/src/qtui.h +++ b/src/qtui.h @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_EXTERNUI_H #define BITCOIN_EXTERNUI_H diff --git a/src/script.cpp b/src/script.cpp index a7e4d3e2..bbb32f68 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" using namespace std; diff --git a/src/script.h b/src/script.h index 7d15bbae..502bce1e 100644 --- a/src/script.h +++ b/src/script.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef H_BITCOIN_SCRIPT #define H_BITCOIN_SCRIPT diff --git a/src/serialize.h b/src/serialize.h index e414bd07..b1fabb7a 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_SERIALIZE_H #define BITCOIN_SERIALIZE_H diff --git a/src/uint256.h b/src/uint256.h index 320ee7e9..b7a5c3bf 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UINT256_H #define BITCOIN_UINT256_H diff --git a/src/util.cpp b/src/util.cpp index 66161c7e..be626768 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "strlcpy.h" diff --git a/src/util.h b/src/util.h index 45b14420..da8e7630 100644 --- a/src/util.h +++ b/src/util.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UTIL_H #define BITCOIN_UTIL_H diff --git a/src/wallet.cpp b/src/wallet.cpp index 7d1266e8..3cce3360 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/wallet.h b/src/wallet.h index 90ee518a..7fb1a19e 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_WALLET_H #define BITCOIN_WALLET_H From 58ac600b2c94f12309fc5e18933891590dc1eb4c Mon Sep 17 00:00:00 2001 From: Fordy Date: Fri, 18 May 2012 22:02:28 +0800 Subject: [PATCH 10/14] Update License in File Headers I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file. --- src/base58.h | 2 +- src/bignum.h | 2 +- src/checkpoints.cpp | 2 +- src/checkpoints.h | 2 +- src/db.cpp | 2 +- src/db.h | 2 +- src/headers.h | 2 +- src/init.cpp | 2 +- src/init.h | 2 +- src/irc.cpp | 2 +- src/irc.h | 2 +- src/key.h | 2 +- src/keystore.cpp | 2 +- src/keystore.h | 2 +- src/main.cpp | 3 ++- src/main.h | 2 +- src/net.cpp | 2 +- src/net.h | 2 +- src/noui.h | 2 +- src/protocol.cpp | 2 +- src/protocol.h | 2 +- src/rpc.cpp | 2 +- src/rpc.h | 2 +- src/script.cpp | 2 +- src/script.h | 2 +- src/serialize.h | 2 +- src/ui.cpp | 2 +- src/ui.h | 2 +- src/uibase.cpp | 2 +- src/uint256.h | 2 +- src/util.cpp | 2 +- src/util.h | 2 +- src/wallet.cpp | 2 +- src/wallet.h | 2 +- src/xpm/about.xpm | 2 +- 35 files changed, 36 insertions(+), 35 deletions(-) diff --git a/src/base58.h b/src/base58.h index fe192725..43f3ac28 100644 --- a/src/base58.h +++ b/src/base58.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin Developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. // diff --git a/src/bignum.h b/src/bignum.h index fd5364e8..bd42f77c 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_BIGNUM_H #define BITCOIN_BIGNUM_H diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index f5ce0538..ee74d259 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include // for 'map_list_of()' #include diff --git a/src/checkpoints.h b/src/checkpoints.h index 9d52da40..e38b8b5f 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,6 +1,6 @@ // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CHECKPOINT_H #define BITCOIN_CHECKPOINT_H diff --git a/src/db.cpp b/src/db.cpp index 4c0c557a..68d31710 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/db.h b/src/db.h index 15bfb29c..8f6c42d7 100644 --- a/src/db.h +++ b/src/db.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_DB_H #define BITCOIN_DB_H diff --git a/src/headers.h b/src/headers.h index 88a16d96..537d405b 100644 --- a/src/headers.h +++ b/src/headers.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifdef _MSC_VER #pragma warning(disable:4786) diff --git a/src/init.cpp b/src/init.cpp index 2dccc81b..393d2500 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" #include "rpc.h" diff --git a/src/init.h b/src/init.h index 4017f257..2086b313 100644 --- a/src/init.h +++ b/src/init.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_INIT_H #define BITCOIN_INIT_H diff --git a/src/irc.cpp b/src/irc.cpp index 5ac2306f..76157bd0 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "irc.h" diff --git a/src/irc.h b/src/irc.h index 6945b2ce..4fc071f0 100644 --- a/src/irc.h +++ b/src/irc.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_IRC_H #define BITCOIN_IRC_H diff --git a/src/key.h b/src/key.h index 6bf75084..77b6aeaa 100644 --- a/src/key.h +++ b/src/key.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEY_H #define BITCOIN_KEY_H diff --git a/src/keystore.cpp b/src/keystore.cpp index 2e4de87a..7836ceda 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/keystore.h b/src/keystore.h index cb297c35..fa70933d 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_KEYSTORE_H #define BITCOIN_KEYSTORE_H diff --git a/src/main.cpp b/src/main.cpp index 510aca92..1925c131 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,8 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "headers.h" #include "checkpoints.h" #include "db.h" diff --git a/src/main.h b/src/main.h index e835cdd7..b1c78854 100644 --- a/src/main.h +++ b/src/main.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_MAIN_H #define BITCOIN_MAIN_H diff --git a/src/net.cpp b/src/net.cpp index 5135a88b..04d278c9 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "irc.h" diff --git a/src/net.h b/src/net.h index 24ab43a5..069328de 100644 --- a/src/net.h +++ b/src/net.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NET_H #define BITCOIN_NET_H diff --git a/src/noui.h b/src/noui.h index cbe6fa4c..ad05e1c7 100644 --- a/src/noui.h +++ b/src/noui.h @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NOUI_H #define BITCOIN_NOUI_H diff --git a/src/protocol.cpp b/src/protocol.cpp index 7d80d5d5..a22eba48 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "protocol.h" #include "util.h" diff --git a/src/protocol.h b/src/protocol.h index 6db64900..274b0d34 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef __cplusplus # error This header can only be compiled as C++. diff --git a/src/rpc.cpp b/src/rpc.cpp index e2ae17e4..acd7a893 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "cryptopp/sha.h" diff --git a/src/rpc.h b/src/rpc.h index f2674007..890975eb 100644 --- a/src/rpc.h +++ b/src/rpc.h @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. void ThreadRPCServer(void* parg); int CommandLineRPC(int argc, char *argv[]); diff --git a/src/script.cpp b/src/script.cpp index 377a7abb..e7664d2c 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" using namespace std; diff --git a/src/script.h b/src/script.h index 7d15bbae..502bce1e 100644 --- a/src/script.h +++ b/src/script.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef H_BITCOIN_SCRIPT #define H_BITCOIN_SCRIPT diff --git a/src/serialize.h b/src/serialize.h index 30cde6c3..e3c3210e 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_SERIALIZE_H #define BITCOIN_SERIALIZE_H diff --git a/src/ui.cpp b/src/ui.cpp index bfb708b3..1fcfff6c 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/ui.h b/src/ui.h index 2a128a7b..9ee55b74 100644 --- a/src/ui.h +++ b/src/ui.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UI_H #define BITCOIN_UI_H diff --git a/src/uibase.cpp b/src/uibase.cpp index 6d219ad6..4d9a2cbd 100644 --- a/src/uibase.cpp +++ b/src/uibase.cpp @@ -532,7 +532,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr bSizer631->Add( 0, 4, 0, wxEXPAND, 5 ); - m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2011 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2011 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nCOPYING or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextMain->Wrap( -1 ); bSizer631->Add( m_staticTextMain, 0, wxALL, 5 ); diff --git a/src/uint256.h b/src/uint256.h index 320ee7e9..b7a5c3bf 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UINT256_H #define BITCOIN_UINT256_H diff --git a/src/util.cpp b/src/util.cpp index 766c3ab4..6dc2f3b6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "strlcpy.h" diff --git a/src/util.h b/src/util.h index 4e4cbb9f..88cc1e79 100644 --- a/src/util.h +++ b/src/util.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UTIL_H #define BITCOIN_UTIL_H diff --git a/src/wallet.cpp b/src/wallet.cpp index 6bf8e582..973727b2 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "db.h" diff --git a/src/wallet.h b/src/wallet.h index ea7b2792..e23f4877 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_WALLET_H #define BITCOIN_WALLET_H diff --git a/src/xpm/about.xpm b/src/xpm/about.xpm index 3fa868ca..fea1fb05 100644 --- a/src/xpm/about.xpm +++ b/src/xpm/about.xpm @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. /* XPM */ static const char * about_xpm[] = { /* columns rows colors chars-per-pixel */ From 087fc28f7d4e82a0b79dabbaa19358e48d3084fe Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 17 May 2012 12:10:15 +0200 Subject: [PATCH 11/14] Filter out whitespace and zero-width non-breaking spaces in validator - Fixes issues with copy/pasting from web or html emails (#1325) --- src/qt/bitcoinaddressvalidator.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/qt/bitcoinaddressvalidator.cpp b/src/qt/bitcoinaddressvalidator.cpp index 37387780..c804ad0d 100644 --- a/src/qt/bitcoinaddressvalidator.cpp +++ b/src/qt/bitcoinaddressvalidator.cpp @@ -21,9 +21,12 @@ BitcoinAddressValidator::BitcoinAddressValidator(QObject *parent) : QValidator::State BitcoinAddressValidator::validate(QString &input, int &pos) const { // Correction - for(int idx=0; idx Date: Tue, 22 May 2012 12:06:08 +0100 Subject: [PATCH 12/14] Correct debug.log output to show correct function the debug is coming from. --- src/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1925c131..ee814aa5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2580,7 +2580,7 @@ bool ProcessMessages(CNode* pfrom) unsigned int nMessageSize = hdr.nMessageSize; if (nMessageSize > MAX_SIZE) { - printf("ProcessMessage(%s, %u bytes) : nMessageSize > MAX_SIZE\n", strCommand.c_str(), nMessageSize); + printf("ProcessMessages(%s, %u bytes) : nMessageSize > MAX_SIZE\n", strCommand.c_str(), nMessageSize); continue; } if (nMessageSize > vRecv.size()) @@ -2598,7 +2598,7 @@ bool ProcessMessages(CNode* pfrom) memcpy(&nChecksum, &hash, sizeof(nChecksum)); if (nChecksum != hdr.nChecksum) { - printf("ProcessMessage(%s, %u bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", + printf("ProcessMessages(%s, %u bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", strCommand.c_str(), nMessageSize, nChecksum, hdr.nChecksum); continue; } @@ -2622,22 +2622,22 @@ bool ProcessMessages(CNode* pfrom) if (strstr(e.what(), "end of data")) { // Allow exceptions from underlength message on vRecv - printf("ProcessMessage(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what()); + printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what()); } else if (strstr(e.what(), "size too large")) { // Allow exceptions from overlong size - printf("ProcessMessage(%s, %u bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what()); + printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what()); } else { - PrintExceptionContinue(&e, "ProcessMessage()"); + PrintExceptionContinue(&e, "ProcessMessages()"); } } catch (std::exception& e) { - PrintExceptionContinue(&e, "ProcessMessage()"); + PrintExceptionContinue(&e, "ProcessMessages()"); } catch (...) { - PrintExceptionContinue(NULL, "ProcessMessage()"); + PrintExceptionContinue(NULL, "ProcessMessages()"); } if (!fRet) From b6862f7b74d0ea7442cf3b9eec7b9556ca47ce4b Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Tue, 22 May 2012 15:12:52 -0400 Subject: [PATCH 13/14] Prevent crashes due to missing or corrupted database records Any problems seen during deserialization will throw an uncaught exception, crashing the entire bitcoin process. Properly return an error instead, so that we may at least log the error and gracefully shutdown other portions of the app. --- src/db.cpp | 16 ++++++++++++++-- src/db.h | 9 +++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index 68d31710..d509253e 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -390,9 +390,15 @@ bool CTxDB::ReadOwnerTxes(uint160 hash160, int nMinHeight, vector& string strType; uint160 hashItem; CDiskTxPos pos; - ssKey >> strType >> hashItem >> pos; int nItemHeight; - ssValue >> nItemHeight; + + try { + ssKey >> strType >> hashItem >> pos; + ssValue >> nItemHeight; + } + catch (std::exception &e) { + return error("%s() : deserialize error", __PRETTY_FUNCTION__); + } // Read transaction if (strType != "owner" || hashItem != hash160) @@ -512,6 +518,8 @@ bool CTxDB::LoadBlockIndex() return false; // Unserialize + + try { string strType; ssKey >> strType; if (strType == "blockindex") @@ -543,6 +551,10 @@ bool CTxDB::LoadBlockIndex() { break; } + } // try + catch (std::exception &e) { + return error("%s() : deserialize error", __PRETTY_FUNCTION__); + } } pcursor->close(); diff --git a/src/db.h b/src/db.h index 8f6c42d7..551e0934 100644 --- a/src/db.h +++ b/src/db.h @@ -72,8 +72,13 @@ protected: return false; // Unserialize value - CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK); - ssValue >> value; + try { + CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK); + ssValue >> value; + } + catch (std::exception &e) { + return false; + } // Clear and free memory memset(datValue.get_data(), 0, datValue.get_size()); From a2de1ea2d5776289c247bbc18c1ed13e16a4169f Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Tue, 22 May 2012 15:23:17 -0400 Subject: [PATCH 14/14] Prevent crashes due to missing or corrupted blk????.dat records --- src/main.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index b1c78854..44624f5c 100644 --- a/src/main.h +++ b/src/main.h @@ -601,7 +601,13 @@ public: // Read transaction if (fseek(filein, pos.nTxPos, SEEK_SET) != 0) return error("CTransaction::ReadFromDisk() : fseek failed"); - filein >> *this; + + try { + filein >> *this; + } + catch (std::exception &e) { + return error("%s() : deserialize or I/O error", __PRETTY_FUNCTION__); + } // Return file pointer if (pfileRet) @@ -993,7 +999,12 @@ public: filein.nType |= SER_BLOCKHEADERONLY; // Read block - filein >> *this; + try { + filein >> *this; + } + catch (std::exception &e) { + return error("%s() : deserialize or I/O error", __PRETTY_FUNCTION__); + } // Check the header if (!CheckProofOfWork(GetHash(), nBits))