Skip to content

Commit

Permalink
Merge branch '0.6.x' of git://gitorious.org/+bitcoin-stable-developer…
Browse files Browse the repository at this point in the history
…s/bitcoin/bitcoind-stable into 0.6.3
  • Loading branch information
gavinandresen committed Jun 19, 2012
2 parents b90b815 + 5e322a7 commit 23e7583
Show file tree
Hide file tree
Showing 67 changed files with 200 additions and 130 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,6 +1,7 @@
src/*.exe
src/bitcoin
src/bitcoind
src/test_bitcoin
src/build.h
.*.swp
*.*~*
Expand All @@ -20,3 +21,4 @@ qrc_*.cpp
*.pro.user
#mac specific
.DS_Store
build
2 changes: 1 addition & 1 deletion bitcoin-qt.pro
Expand Up @@ -83,7 +83,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
# regenerate src/build.h
!windows || contains(USE_BUILD_INFO, 1) {
genbuild.depends = FORCE
genbuild.commands = cd $$PWD; share/genbuild.sh $$OUT_PWD/build/build.h
genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h
genbuild.target = genbuildhook
PRE_TARGETDEPS += genbuildhook
QMAKE_EXTRA_TARGETS += genbuild
Expand Down
4 changes: 2 additions & 2 deletions contrib/debian/control
Expand Up @@ -35,7 +35,7 @@ Description: peer-to-peer network based digital currency - daemon
By default connects to an IRC network to discover other peers.
.
Full transaction history is stored locally at each client. This
requires 150+ MB of space, slowly growing.
requires 2+ GB of space, slowly growing.
.
This package provides bitcoind, a combined daemon and CLI tool to
interact with the daemon.
Expand All @@ -53,6 +53,6 @@ Description: peer-to-peer network based digital currency - QT GUI
By default connects to an IRC network to discover other peers.
.
Full transaction history is stored locally at each client. This
requires 150+ MB of space, slowly growing.
requires 2+ GB of space, slowly growing.
.
This package provides bitcoin-qt, a GUI for Bitcoin based on QT.
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian-win32.yml
Expand Up @@ -12,7 +12,7 @@ packages:
- "faketime"
reference_datetime: "2011-01-30 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
- "url": "https://git.gitorious.org/+bitcoin-stable-developers/bitcoin/bitcoind-stable.git"
"dir": "bitcoin"
files:
- "qt-win32-4.7.4-gitian.zip"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-descriptors/gitian.yml
Expand Up @@ -20,7 +20,7 @@ packages:
- "libpng12-dev"
reference_datetime: "2011-01-30 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
- "url": "https://git.gitorious.org/+bitcoin-stable-developers/bitcoin/bitcoind-stable.git"
"dir": "bitcoin"
files:
- "miniupnpc-1.6.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-downloader/linux-download-config
Expand Up @@ -31,7 +31,7 @@ signers:
weight: 40
name: "Gavin Andresen"
key: gavinandresen
71A3B16735405025D447E8F274810B012346C9A6
71A3B16735405025D447E8F274810B012346C9A6:
weight: 40
name: "Wladimir J. van der Laan"
key: laanwj
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-downloader/win32-download-config
Expand Up @@ -31,7 +31,7 @@ signers:
weight: 40
name: "Gavin Andresen"
key: gavinandresen
71A3B16735405025D447E8F274810B012346C9A6
71A3B16735405025D447E8F274810B012346C9A6:
weight: 40
name: "Wladimir J. van der Laan"
key: laanwj
Expand Down
4 changes: 2 additions & 2 deletions doc/build-unix.txt
Expand Up @@ -33,14 +33,14 @@ Dependencies
miniupnpc may be used for UPnP port mapping. It can be downloaded from
http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and
turned off by default. Set USE_UPNP to a different value to control this:
USE_UPNP= No UPnP support - miniupnp not required
USE_UPNP=- No UPnP support - miniupnp not required
USE_UPNP=0 (the default) UPnP support turned off by default at runtime
USE_UPNP=1 UPnP support turned on by default at runtime

libqrencode may be used for QRCode image generation. It can be downloaded
from http://fukuchi.org/works/qrencode/index.html.en, or installed via
your package manager. Set USE_QRCODE to control this:
USE_QRCODE=0 (the default) No QRCode support - libarcode not required
USE_QRCODE=0 (the default) No QRCode support - libqrcode not required
USE_QRCODE=1 QRCode support enabled

Licenses of statically linked libraries:
Expand Down
2 changes: 2 additions & 0 deletions doc/release-process.txt
Expand Up @@ -98,6 +98,8 @@

* update wiki download links

* update wiki changelog: https://en.bitcoin.it/wiki/Changelog

* Commit your signature to gitian.sigs:
pushd gitian.sigs
git add ${VERSION}/${SIGNER}
Expand Down
2 changes: 1 addition & 1 deletion src/addrman.cpp
@@ -1,6 +1,6 @@
// Copyright (c) 2012 Pieter Wuille
// 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 "addrman.h"

Expand Down
2 changes: 1 addition & 1 deletion src/addrman.h
@@ -1,6 +1,6 @@
// Copyright (c) 2012 Pieter Wuille
// 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_ADDRMAN
#define _BITCOIN_ADDRMAN 1

Expand Down
3 changes: 1 addition & 2 deletions src/allocators.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_ALLOCATORS_H
#define BITCOIN_ALLOCATORS_H

Expand Down Expand Up @@ -117,7 +117,6 @@ struct zero_after_free_allocator : public std::allocator<T>
};

// This is exactly like std::string, but with a custom allocator.
// (secure_allocator<> is defined in serialize.h)
typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;

#endif
2 changes: 1 addition & 1 deletion src/base58.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.


//
Expand Down
2 changes: 1 addition & 1 deletion src/bignum.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_BIGNUM_H
#define BITCOIN_BIGNUM_H

Expand Down
24 changes: 14 additions & 10 deletions 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 "main.h"
#include "wallet.h"
Expand Down Expand Up @@ -225,7 +225,7 @@ Value stop(const Array& params, bool fHelp)
"stop\n"
"Stop bitcoin server.");
// Shutdown will take long enough that the response should get back
QueueShutdown();
StartShutdown();
return "bitcoin server stopping";
}

Expand Down Expand Up @@ -839,7 +839,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();

Expand All @@ -861,7 +862,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;
}
Expand Down Expand Up @@ -999,10 +1001,12 @@ Value addmultisigaddress(const Array& params, bool fHelp)
strAccount = AccountFromValue(params[2]);

// Gather public keys
if ((nRequired < 1) || ((int)keys.size() < nRequired))
if (nRequired < 1)
throw runtime_error("a multisignature address must require at least one key to redeem");
if ((int)keys.size() < nRequired)
throw runtime_error(
strprintf("wrong number of keys"
"(got %d, need at least %d)", keys.size(), nRequired));
strprintf("not enough keys supplied "
"(got %d keys, but need at least %d to redeem)", keys.size(), nRequired));
std::vector<CKey> pubkeys;
pubkeys.resize(keys.size());
for (unsigned int i = 0; i < keys.size(); i++)
Expand Down Expand Up @@ -1703,7 +1707,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// BDB seems to have a bad habit of writing old data into
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
QueueShutdown();
StartShutdown();
return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet";
}

Expand Down Expand Up @@ -2376,7 +2380,7 @@ void ThreadRPCServer2(void* parg)
GetConfigFile().string().c_str(),
EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()),
_("Error"), wxOK | wxMODAL);
QueueShutdown();
StartShutdown();
return;
}

Expand All @@ -2397,7 +2401,7 @@ void ThreadRPCServer2(void* parg)
{
ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()),
_("Error"), wxOK | wxMODAL);
QueueShutdown();
StartShutdown();
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bitcoinrpc.h
@@ -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.

#ifndef _BITCOINRPC_H_
#define _BITCOINRPC_H_ 1
Expand Down
2 changes: 1 addition & 1 deletion 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 <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/checkpoints.h
@@ -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.
#ifndef BITCOIN_CHECKPOINT_H
#define BITCOIN_CHECKPOINT_H

Expand Down
2 changes: 1 addition & 1 deletion src/compat.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_COMPAT_H
#define _BITCOIN_COMPAT_H 1

Expand Down
2 changes: 1 addition & 1 deletion 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 "db.h"
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion src/db.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_DB_H
#define BITCOIN_DB_H

Expand Down
16 changes: 15 additions & 1 deletion 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 "db.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
Expand Down Expand Up @@ -36,6 +36,17 @@ void ExitTimeout(void* parg)
#endif
}

void StartShutdown()
{
#ifdef QT_GUI
// ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in bitcoin.cpp afterwards)
QueueShutdown();
#else
// Without UI, Shutdown() can simply be started in a new thread
CreateThread(Shutdown, NULL);
#endif
}

void Shutdown(void* parg)
{
static CCriticalSection cs_Shutdown;
Expand Down Expand Up @@ -64,7 +75,10 @@ void Shutdown(void* parg)
Sleep(50);
printf("Bitcoin exiting\n\n");
fExit = true;
#ifndef QT_GUI
// ensure non UI client get's exited here, but let Bitcoin-Qt reach return 0; in bitcoin.cpp
exit(0);
#endif
}
else
{
Expand Down
6 changes: 2 additions & 4 deletions src/init.h
@@ -1,19 +1,17 @@
// 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_INIT_H
#define BITCOIN_INIT_H

#include "wallet.h"

extern CWallet* pwalletMain;

void StartShutdown();
void Shutdown(void* parg);
bool AppInit(int argc, char* argv[]);
bool AppInit2(int argc, char* argv[]);

bool GetStartOnSystemStartup();
bool SetStartOnSystemStartup(bool fAutoStart);

#endif
2 changes: 1 addition & 1 deletion 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 "irc.h"
#include "net.h"
Expand Down
2 changes: 1 addition & 1 deletion src/irc.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_IRC_H
#define BITCOIN_IRC_H

Expand Down
2 changes: 1 addition & 1 deletion src/key.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 <map>

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
2 changes: 1 addition & 1 deletion src/keystore.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 "keystore.h"
#include "script.h"
Expand Down
2 changes: 1 addition & 1 deletion src/keystore.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_KEYSTORE_H
#define BITCOIN_KEYSTORE_H

Expand Down

0 comments on commit 23e7583

Please sign in to comment.