mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge remote branch 'refs/remotes/svn/trunk' into svn
This commit is contained in:
commit
6f8ba620c2
6 changed files with 95 additions and 7 deletions
|
@ -21,7 +21,8 @@ or Boost 1.37: sudo apt-get install libboost1.37-dev
|
||||||
|
|
||||||
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
||||||
|
|
||||||
We're now using wxWidgets 2.9, which uses UTF-8. Don't try 2.8, it won't work.
|
We're using wxWidgets 2.9.0, which uses UTF-8. Don't try 2.8, it won't work.
|
||||||
|
The build hasn't been updated to work with wxWidgets 2.9.1 yet.
|
||||||
|
|
||||||
You need to download wxWidgets from http://www.wxwidgets.org/downloads/
|
You need to download wxWidgets from http://www.wxwidgets.org/downloads/
|
||||||
and build it yourself. See the build instructions and configure parameters
|
and build it yourself. See the build instructions and configure parameters
|
||||||
|
|
4
db.cpp
4
db.cpp
|
@ -592,7 +592,7 @@ bool CWalletDB::WriteAccount(const string& strAccount, const CAccount& account)
|
||||||
|
|
||||||
bool CWalletDB::WriteAccountingEntry(const string& strAccount, const CAccountingEntry& acentry)
|
bool CWalletDB::WriteAccountingEntry(const string& strAccount, const CAccountingEntry& acentry)
|
||||||
{
|
{
|
||||||
return Write(make_pair(string("acentry"), make_pair(strAccount, ++nAccountingEntryNumber)), acentry);
|
return Write(make_tuple(string("acentry"), strAccount, ++nAccountingEntryNumber), acentry);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64 CWalletDB::GetAccountCreditDebit(const string& strAccount)
|
int64 CWalletDB::GetAccountCreditDebit(const string& strAccount)
|
||||||
|
@ -608,7 +608,7 @@ int64 CWalletDB::GetAccountCreditDebit(const string& strAccount)
|
||||||
// Read next record
|
// Read next record
|
||||||
CDataStream ssKey;
|
CDataStream ssKey;
|
||||||
if (fFlags == DB_SET_RANGE)
|
if (fFlags == DB_SET_RANGE)
|
||||||
ssKey << make_pair(string("acentry"), make_pair(strAccount, uint64(0)));
|
ssKey << make_tuple(string("acentry"), strAccount, uint64(0));
|
||||||
CDataStream ssValue;
|
CDataStream ssValue;
|
||||||
int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags);
|
int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags);
|
||||||
fFlags = DB_NEXT;
|
fFlags = DB_NEXT;
|
||||||
|
|
6
rpc.cpp
6
rpc.cpp
|
@ -628,6 +628,8 @@ Value getbalance(const Array& params, bool fHelp)
|
||||||
if (params.size() == 0)
|
if (params.size() == 0)
|
||||||
return ((double)GetBalance() / (double)COIN);
|
return ((double)GetBalance() / (double)COIN);
|
||||||
|
|
||||||
|
throw runtime_error("under construction"); //// to be released soon
|
||||||
|
|
||||||
string strAccount = params[0].get_str();
|
string strAccount = params[0].get_str();
|
||||||
int nMinDepth = 1;
|
int nMinDepth = 1;
|
||||||
if (params.size() > 1)
|
if (params.size() > 1)
|
||||||
|
@ -646,6 +648,8 @@ Value movecmd(const Array& params, bool fHelp)
|
||||||
"move <fromaccount> <toaccount> <amount> [minconf=1] [comment]\n"
|
"move <fromaccount> <toaccount> <amount> [minconf=1] [comment]\n"
|
||||||
"Move from one account in your wallet to another.");
|
"Move from one account in your wallet to another.");
|
||||||
|
|
||||||
|
throw runtime_error("under construction");
|
||||||
|
|
||||||
string strFrom = params[0].get_str();
|
string strFrom = params[0].get_str();
|
||||||
string strTo = params[1].get_str();
|
string strTo = params[1].get_str();
|
||||||
int64 nAmount = AmountFromValue(params[2]);
|
int64 nAmount = AmountFromValue(params[2]);
|
||||||
|
@ -707,6 +711,8 @@ Value sendfrom(const Array& params, bool fHelp)
|
||||||
"sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
|
"sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]\n"
|
||||||
"<amount> is a real and is rounded to the nearest 0.01");
|
"<amount> is a real and is rounded to the nearest 0.01");
|
||||||
|
|
||||||
|
throw runtime_error("under construction");
|
||||||
|
|
||||||
string strAccount = params[0].get_str();
|
string strAccount = params[0].get_str();
|
||||||
string strAddress = params[1].get_str();
|
string strAddress = params[1].get_str();
|
||||||
int64 nAmount = AmountFromValue(params[2]);
|
int64 nAmount = AmountFromValue(params[2]);
|
||||||
|
|
80
serialize.h
80
serialize.h
|
@ -7,6 +7,9 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <boost/type_traits/is_fundamental.hpp>
|
#include <boost/type_traits/is_fundamental.hpp>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
#include <boost/tuple/tuple_comparison.hpp>
|
||||||
|
#include <boost/tuple/tuple_io.hpp>
|
||||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||||
typedef __int64 int64;
|
typedef __int64 int64;
|
||||||
typedef unsigned __int64 uint64;
|
typedef unsigned __int64 uint64;
|
||||||
|
@ -22,7 +25,7 @@ class CDataStream;
|
||||||
class CAutoFile;
|
class CAutoFile;
|
||||||
static const unsigned int MAX_SIZE = 0x02000000;
|
static const unsigned int MAX_SIZE = 0x02000000;
|
||||||
|
|
||||||
static const int VERSION = 31601;
|
static const int VERSION = 31701;
|
||||||
static const char* pszSubVer = "";
|
static const char* pszSubVer = "";
|
||||||
|
|
||||||
|
|
||||||
|
@ -338,6 +341,16 @@ template<typename K, typename T> unsigned int GetSerializeSize(const std::pair<K
|
||||||
template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion=VERSION);
|
template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion=VERSION);
|
||||||
template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion=VERSION);
|
template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion=VERSION);
|
||||||
|
|
||||||
|
// 3 tuple
|
||||||
|
template<typename T0, typename T1, typename T2> unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2>& item, int nType, int nVersion=VERSION);
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2> void Serialize(Stream& os, const boost::tuple<T0, T1, T2>& item, int nType, int nVersion=VERSION);
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2> void Unserialize(Stream& is, boost::tuple<T0, T1, T2>& item, int nType, int nVersion=VERSION);
|
||||||
|
|
||||||
|
// 4 tuple
|
||||||
|
template<typename T0, typename T1, typename T2, typename T3> unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion=VERSION);
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2, typename T3> void Serialize(Stream& os, const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion=VERSION);
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2, typename T3> void Unserialize(Stream& is, boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion=VERSION);
|
||||||
|
|
||||||
// map
|
// map
|
||||||
template<typename K, typename T, typename Pred, typename A> unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion=VERSION);
|
template<typename K, typename T, typename Pred, typename A> unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion=VERSION);
|
||||||
template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion=VERSION);
|
template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion=VERSION);
|
||||||
|
@ -554,6 +567,71 @@ void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// 3 tuple
|
||||||
|
//
|
||||||
|
template<typename T0, typename T1, typename T2>
|
||||||
|
unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
unsigned int nSize = 0;
|
||||||
|
nSize += GetSerializeSize(get<0>(item), nType, nVersion);
|
||||||
|
nSize += GetSerializeSize(get<1>(item), nType, nVersion);
|
||||||
|
nSize += GetSerializeSize(get<2>(item), nType, nVersion);
|
||||||
|
return nSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2>
|
||||||
|
void Serialize(Stream& os, const boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
Serialize(os, get<0>(item), nType, nVersion);
|
||||||
|
Serialize(os, get<1>(item), nType, nVersion);
|
||||||
|
Serialize(os, get<2>(item), nType, nVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2>
|
||||||
|
void Unserialize(Stream& is, boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
Unserialize(is, get<0>(item), nType, nVersion);
|
||||||
|
Unserialize(is, get<1>(item), nType, nVersion);
|
||||||
|
Unserialize(is, get<2>(item), nType, nVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// 4 tuple
|
||||||
|
//
|
||||||
|
template<typename T0, typename T1, typename T2, typename T3>
|
||||||
|
unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
unsigned int nSize = 0;
|
||||||
|
nSize += GetSerializeSize(get<0>(item), nType, nVersion);
|
||||||
|
nSize += GetSerializeSize(get<1>(item), nType, nVersion);
|
||||||
|
nSize += GetSerializeSize(get<2>(item), nType, nVersion);
|
||||||
|
nSize += GetSerializeSize(get<3>(item), nType, nVersion);
|
||||||
|
return nSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2, typename T3>
|
||||||
|
void Serialize(Stream& os, const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
Serialize(os, get<0>(item), nType, nVersion);
|
||||||
|
Serialize(os, get<1>(item), nType, nVersion);
|
||||||
|
Serialize(os, get<2>(item), nType, nVersion);
|
||||||
|
Serialize(os, get<3>(item), nType, nVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Stream, typename T0, typename T1, typename T2, typename T3>
|
||||||
|
void Unserialize(Stream& is, boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
|
||||||
|
{
|
||||||
|
Unserialize(is, get<0>(item), nType, nVersion);
|
||||||
|
Unserialize(is, get<1>(item), nType, nVersion);
|
||||||
|
Unserialize(is, get<2>(item), nType, nVersion);
|
||||||
|
Unserialize(is, get<3>(item), nType, nVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// map
|
// map
|
||||||
//
|
//
|
||||||
|
|
|
@ -7,7 +7,7 @@ RequestExecutionLevel highest
|
||||||
|
|
||||||
# General Symbol Definitions
|
# General Symbol Definitions
|
||||||
!define REGKEY "SOFTWARE\$(^Name)"
|
!define REGKEY "SOFTWARE\$(^Name)"
|
||||||
!define VERSION 0.3.15
|
!define VERSION 0.3.17
|
||||||
!define COMPANY "Bitcoin project"
|
!define COMPANY "Bitcoin project"
|
||||||
!define URL http://www.bitcoin.org/
|
!define URL http://www.bitcoin.org/
|
||||||
|
|
||||||
|
@ -42,12 +42,12 @@ Var StartMenuGroup
|
||||||
!insertmacro MUI_LANGUAGE English
|
!insertmacro MUI_LANGUAGE English
|
||||||
|
|
||||||
# Installer attributes
|
# Installer attributes
|
||||||
OutFile bitcoin-0.3.15-win32-setup.exe
|
OutFile bitcoin-0.3.17-win32-setup.exe
|
||||||
InstallDir $PROGRAMFILES\Bitcoin
|
InstallDir $PROGRAMFILES\Bitcoin
|
||||||
CRCCheck on
|
CRCCheck on
|
||||||
XPStyle on
|
XPStyle on
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
VIProductVersion 0.3.15.0
|
VIProductVersion 0.3.17.0
|
||||||
VIAddVersionKey ProductName Bitcoin
|
VIAddVersionKey ProductName Bitcoin
|
||||||
VIAddVersionKey ProductVersion "${VERSION}"
|
VIAddVersionKey ProductVersion "${VERSION}"
|
||||||
VIAddVersionKey CompanyName "${COMPANY}"
|
VIAddVersionKey CompanyName "${COMPANY}"
|
||||||
|
|
3
ui.cpp
3
ui.cpp
|
@ -1631,6 +1631,9 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
|
||||||
//m_listBox->Append(_("Test 2"));
|
//m_listBox->Append(_("Test 2"));
|
||||||
m_listBox->SetSelection(0);
|
m_listBox->SetSelection(0);
|
||||||
SelectPage(0);
|
SelectPage(0);
|
||||||
|
#ifndef __WXMSW__
|
||||||
|
SetSize(1.0 * GetSize().GetWidth(), 1.2 * GetSize().GetHeight());
|
||||||
|
#endif
|
||||||
#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
|
#if defined(__WXGTK__) || defined(__WXMAC_OSX__)
|
||||||
m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
|
m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
|
||||||
if (!mapArgs.count("-minimizetotray"))
|
if (!mapArgs.count("-minimizetotray"))
|
||||||
|
|
Loading…
Reference in a new issue