aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2010-07-19 01:02:04 +0000
committerGavin Andresen <gavinandresen@gmail.com>2010-07-19 01:02:04 +0000
commit9d2174b6f5f3fac2463c7ebc2dbb9004b3740d23 (patch)
treef378432b78a6cef9c0f9f0260cf549bd560b8bc0
parent8bd66202c324a6c7a79abc0f1f0558dacbc59460 (diff)
version 0.3.1 rc1v0.3.1rc1
-rw-r--r--db.cpp2
-rw-r--r--irc.cpp4
-rw-r--r--main.cpp7
-rw-r--r--main.h1
-rw-r--r--makefile.unix2
-rw-r--r--serialize.h2
-rw-r--r--setup.nsi6
-rw-r--r--ui.cpp15
8 files changed, 30 insertions, 9 deletions
diff --git a/db.cpp b/db.cpp
index ea1c1158aa..a44ced3cee 100644
--- a/db.cpp
+++ b/db.cpp
@@ -592,6 +592,8 @@ bool CWalletDB::LoadWallet()
else if (strType == "version")
{
ssValue >> nFileVersion;
+ if (nFileVersion == 10300)
+ nFileVersion = 300;
}
else if (strType == "setting")
{
diff --git a/irc.cpp b/irc.cpp
index b3993e7cd6..daa9a0db61 100644
--- a/irc.cpp
+++ b/irc.cpp
@@ -158,6 +158,10 @@ bool Wait(int nSeconds)
void ThreadIRCSeed(void* parg)
{
+ if (mapArgs.count("-connect"))
+ return;
+ if (mapArgs.count("-noirc"))
+ return;
printf("ThreadIRCSeed started\n");
int nErrorWait = 10;
int nRetryWait = 10;
diff --git a/main.cpp b/main.cpp
index 5f500975ed..8ddcd68890 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2544,13 +2544,13 @@ void BlockSHA256(const void* pin, unsigned int nBlocks, void* pout)
void BitcoinMiner()
{
printf("BitcoinMiner started\n");
+ SetThreadPriority(THREAD_PRIORITY_LOWEST);
CKey key;
key.MakeNewKey();
CBigNum bnExtraNonce = 0;
while (fGenerateBitcoins)
{
- SetThreadPriority(THREAD_PRIORITY_LOWEST);
Sleep(50);
if (fShutdown)
return;
@@ -2610,6 +2610,9 @@ void BitcoinMiner()
CTransaction& tx = (*mi).second;
if (tx.IsCoinBase() || !tx.IsFinal())
continue;
+ unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK);
+ if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE - 10000)
+ continue;
// Transaction fee based on block size
int64 nMinFee = tx.GetMinFee(nBlockSize);
@@ -2620,7 +2623,7 @@ void BitcoinMiner()
swap(mapTestPool, mapTestPoolTmp);
pblock->vtx.push_back(tx);
- nBlockSize += ::GetSerializeSize(tx, SER_NETWORK);
+ nBlockSize += nTxSize;
vfAlreadyAdded[n] = true;
fFoundSomething = true;
}
diff --git a/main.h b/main.h
index 8692579f63..9a9bdf29c8 100644
--- a/main.h
+++ b/main.h
@@ -15,6 +15,7 @@ class CWalletTx;
class CKeyItem;
static const unsigned int MAX_SIZE = 0x02000000;
+static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const int64 COIN = 100000000;
static const int64 CENT = 1000000;
static const int COINBASE_MATURITY = 100;
diff --git a/makefile.unix b/makefile.unix
index 3f99f0a143..6280a74951 100644
--- a/makefile.unix
+++ b/makefile.unix
@@ -23,8 +23,8 @@ LIBS= \
-Wl,-Bstatic \
-l boost_system -l boost_filesystem \
-l db_cxx \
- -Wl,-Bdynamic \
-l crypto \
+ -Wl,-Bdynamic \
-l gthread-2.0
WXDEFS=-D__WXGTK__ -DNOPCH
diff --git a/serialize.h b/serialize.h
index 7ebc047f76..ddaf14d565 100644
--- a/serialize.h
+++ b/serialize.h
@@ -20,7 +20,7 @@ class CDataStream;
class CAutoFile;
static const int VERSION = 301;
-static const char* pszSubVer = ".0";
+static const char* pszSubVer = "";
diff --git a/setup.nsi b/setup.nsi
index c8a3b72351..4407c6f264 100644
--- a/setup.nsi
+++ b/setup.nsi
@@ -7,7 +7,7 @@ RequestExecutionLevel highest
# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
-!define VERSION 0.3.0
+!define VERSION 0.3.1
!define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/
@@ -42,12 +42,12 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English
# Installer attributes
-OutFile bitcoin-0.3.0-win32-setup.exe
+OutFile bitcoin-0.3.1-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
CRCCheck on
XPStyle on
ShowInstDetails show
-VIProductVersion 0.3.0.0
+VIProductVersion 0.3.1.0
VIAddVersionKey ProductName Bitcoin
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
diff --git a/ui.cpp b/ui.cpp
index 9eab4f6fc1..319e3fd783 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -375,13 +375,12 @@ void CMainFrame::OnIconize(wxIconizeEvent& event)
// to get rid of the deprecated warning. Just ignore it.
if (!event.Iconized())
fClosedToTray = false;
-//#ifdef __WXMSW__
// The tray icon sometimes disappears on ubuntu karmic
// Hiding the taskbar button doesn't work cleanly on ubuntu lucid
+ // Reports of CPU peg on 64-bit linux
if (fMinimizeToTray && event.Iconized())
fClosedToTray = true;
Show(!fClosedToTray);
-//#endif
ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
}
@@ -1446,6 +1445,14 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
SelectPage(0);
#ifdef __WXGTK__
m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
+ if (!mapArgs.count("-minimizetotray"))
+ {
+ // Minimize to tray is just too buggy on Linux
+ fMinimizeToTray = false;
+ m_checkBoxMinimizeToTray->SetValue(false);
+ m_checkBoxMinimizeToTray->Enable(false);
+ m_checkBoxMinimizeOnClose->SetLabel(_("&Minimize on close"));
+ }
#endif
#ifdef __WXMAC_OSX__
m_checkBoxStartOnSystemStartup->Enable(false); // not implemented yet
@@ -2536,6 +2543,10 @@ void CreateMainWindow()
pframeMain = new CMainFrame(NULL);
if (mapArgs.count("-min"))
pframeMain->Iconize(true);
+#ifdef __WXGTK__
+ if (!mapArgs.count("-minimizetotray"))
+ fMinimizeToTray = false;
+#endif
pframeMain->Show(true); // have to show first to get taskbar button to hide
if (fMinimizeToTray && pframeMain->IsIconized())
fClosedToTray = true;