From c21121752d95ee241eb616a9b958fc662c874803 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 22 Apr 2012 13:59:24 -0400 Subject: [PATCH 1/7] CBlock::WriteToDisk() properly checks ftell(3) for error return Rather than storing ftell(3)'s return value -- a long -- in an unsigned int, we store and check a properly typed temp. Then, assured a non-negative value, we store in nBlockPosRet. --- src/main.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index de674b5bb10..e835cdd7bb6 100644 --- a/src/main.h +++ b/src/main.h @@ -961,9 +961,10 @@ public: fileout << FLATDATA(pchMessageStart) << nSize; // Write block - nBlockPosRet = ftell(fileout); - if (nBlockPosRet == -1) + long fileOutPos = ftell(fileout); + if (fileOutPos < 0) return error("CBlock::WriteToDisk() : ftell failed"); + nBlockPosRet = fileOutPos; fileout << *this; // Flush stdio buffers and commit to disk before returning From 282e3ffe6e292ed6b11bc71414420de052193757 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Wed, 25 Apr 2012 14:07:24 +0200 Subject: [PATCH 2/7] We should include netinet/in.h to use sockaddr_in (POSIX.1-2001) --- src/net.cpp | 2 ++ src/protocol.cpp | 1 + src/protocol.h | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index 92ccb1e8806..5135a88b32d 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -12,6 +12,8 @@ #ifdef __WXMSW__ #include +#else +#include #endif #ifdef USE_UPNP diff --git a/src/protocol.cpp b/src/protocol.cpp index a3e54ebc3de..7d80d5d5d0d 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -8,6 +8,7 @@ #ifndef __WXMSW__ # include +# include #endif // Prototypes from net.h, but that header (currently) stinks, can't #include it without breaking things diff --git a/src/protocol.h b/src/protocol.h index 53d3eef4d57..6db64900f23 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -10,6 +10,10 @@ #ifndef __INCLUDED_PROTOCOL_H__ #define __INCLUDED_PROTOCOL_H__ +#ifndef __WXMSW__ +#include +#endif + #include "serialize.h" #include #include "uint256.h" From dfac636fd7e4f0168daade3b3095f3d5a60fd524 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Wed, 25 Apr 2012 14:07:24 +0200 Subject: [PATCH 3/7] We should include netinet/in.h to use sockaddr_in (POSIX.1-2001) --- src/net.cpp | 2 ++ src/protocol.cpp | 1 + src/protocol.h | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index 5b3faea79dd..e92c659a394 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -12,6 +12,8 @@ #ifdef WIN32 #include +#else +#include #endif #ifdef USE_UPNP diff --git a/src/protocol.cpp b/src/protocol.cpp index 9933452d4f6..16ad7468e1e 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -8,6 +8,7 @@ #ifndef WIN32 # include +# include #endif // Prototypes from net.h, but that header (currently) stinks, can't #include it without breaking things diff --git a/src/protocol.h b/src/protocol.h index 53d3eef4d57..c8723fa3ea8 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -10,6 +10,10 @@ #ifndef __INCLUDED_PROTOCOL_H__ #define __INCLUDED_PROTOCOL_H__ +#ifndef WIN32 +#include +#endif + #include "serialize.h" #include #include "uint256.h" From aff6456e8ab47260c1d9598ed00f08fce4848f27 Mon Sep 17 00:00:00 2001 From: freewil Date: Thu, 26 Apr 2012 13:12:44 -0400 Subject: [PATCH 4/7] remove strange debug message from listsinceblock --- src/bitcoinrpc.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index b141e733ff7..4e656284728 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1318,7 +1318,6 @@ Value listsinceblock(const Array& params, bool fHelp) if (target_confirms == 1) { - printf("oops!\n"); lastblock = hashBestChain; } else From 3eb5fdbf5f73535f6a027bbcdf07958610794749 Mon Sep 17 00:00:00 2001 From: freewil Date: Thu, 26 Apr 2012 12:48:33 -0400 Subject: [PATCH 5/7] listsinceblock: rpc param blockid -> blockhash This is more consistent with the rest of the labeling seen by the user when accessing the rpc commands. --- src/bitcoinrpc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 4e656284728..3e82cd3ab77 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1280,8 +1280,8 @@ Value listsinceblock(const Array& params, bool fHelp) { if (fHelp) throw runtime_error( - "listsinceblock [blockid] [target-confirmations]\n" - "Get all transactions in blocks since block [blockid], or all transactions if omitted"); + "listsinceblock [blockhash] [target-confirmations]\n" + "Get all transactions in blocks since block [blockhash], or all transactions if omitted"); CBlockIndex *pindex = NULL; int target_confirms = 1; From c18b82d5db39bff026f10694a062be2dc7048fd8 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 27 Apr 2012 10:50:24 -0400 Subject: [PATCH 6/7] Bump version to 0.4.6 --- contrib/Bitcoin.app/Contents/Info.plist | 2 +- doc/README | 2 +- doc/README_windows.txt | 2 +- share/setup.nsi | 6 +++--- src/serialize.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/Bitcoin.app/Contents/Info.plist b/contrib/Bitcoin.app/Contents/Info.plist index b34827e3ca8..8271c15ef45 100644 --- a/contrib/Bitcoin.app/Contents/Info.plist +++ b/contrib/Bitcoin.app/Contents/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.5 + 0.4.6 CFBundleSignature ???? CFBundleVersion diff --git a/doc/README b/doc/README index e572b2dd530..15f92bf4aff 100644 --- a/doc/README +++ b/doc/README @@ -1,4 +1,4 @@ -Bitcoin 0.4.5 BETA +Bitcoin 0.4.6 BETA Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 6a551a0b971..8dde1a9365a 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin 0.4.5 BETA +Bitcoin 0.4.6 BETA Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying diff --git a/share/setup.nsi b/share/setup.nsi index 643b0ffef8b..27c87db84b7 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -5,7 +5,7 @@ SetCompressor /SOLID lzma # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" -!define VERSION 0.4.5 +!define VERSION 0.4.6 !define COMPANY "Bitcoin project" !define URL http://www.bitcoin.org/ @@ -45,13 +45,13 @@ Var StartMenuGroup !insertmacro MUI_LANGUAGE English # Installer attributes -OutFile bitcoin-0.4.5-win32-setup.exe +OutFile bitcoin-0.4.6-win32-setup.exe InstallDir $PROGRAMFILES\Bitcoin CRCCheck on XPStyle on BrandingText " " ShowInstDetails show -VIProductVersion 0.4.5.0 +VIProductVersion 0.4.6.0 VIAddVersionKey ProductName Bitcoin VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" diff --git a/src/serialize.h b/src/serialize.h index 491169ff58b..302766062ab 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -59,7 +59,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 40500; +static const int VERSION = 40600; static const char* pszSubVer = ""; static const bool VERSION_IS_BETA = true; From e5f43fe30992abd75b6f981fd287cfed64c627ee Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 27 Apr 2012 10:55:06 -0400 Subject: [PATCH 7/7] Bump version to 0.5.5 --- bitcoin-qt.pro | 2 +- doc/README | 2 +- doc/README_windows.txt | 2 +- share/setup.nsi | 6 +++--- src/serialize.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 60f1de89979..922f42ed766 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = -VERSION = 0.5.4 +VERSION = 0.5.5 INCLUDEPATH += src src/json src/qt DEFINES += QT_GUI BOOST_THREAD_USE_LIB CONFIG += no_include_pwd diff --git a/doc/README b/doc/README index 3d8c63a3e1a..41fecd7d477 100644 --- a/doc/README +++ b/doc/README @@ -1,4 +1,4 @@ -Bitcoin 0.5.4 BETA +Bitcoin 0.5.5 BETA Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying diff --git a/doc/README_windows.txt b/doc/README_windows.txt index b4ad595419d..9feb2faed0f 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin 0.5.4 BETA +Bitcoin 0.5.5 BETA Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying diff --git a/share/setup.nsi b/share/setup.nsi index e231436408b..b2d0dd05298 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -5,7 +5,7 @@ SetCompressor /SOLID lzma # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" -!define VERSION 0.5.4 +!define VERSION 0.5.5 !define COMPANY "Bitcoin project" !define URL http://www.bitcoin.org/ @@ -45,13 +45,13 @@ Var StartMenuGroup !insertmacro MUI_LANGUAGE English # Installer attributes -OutFile bitcoin-0.5.4-win32-setup.exe +OutFile bitcoin-0.5.5-win32-setup.exe InstallDir $PROGRAMFILES\Bitcoin CRCCheck on XPStyle on BrandingText " " ShowInstDetails show -VIProductVersion 0.5.4.0 +VIProductVersion 0.5.5.0 VIAddVersionKey ProductName Bitcoin VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" diff --git a/src/serialize.h b/src/serialize.h index 396e1727eb6..346594c86a4 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 50400; +static const int VERSION = 50500; static const char* pszSubVer = ""; static const bool VERSION_IS_BETA = true;