Skip to content

Commit a30b56e

Browse files
fix openssl linkage problems,
disable minimize to tray on Linux because it has too many problems including a CPU peg bug git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@103 1a98c847-1fd6-4fd8-948a-caf3550aa51b
1 parent 6e5d67e commit a30b56e

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

db.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ bool CWalletDB::LoadWallet()
592592
else if (strType == "version")
593593
{
594594
ssValue >> nFileVersion;
595+
if (nFileVersion == 10300)
596+
nFileVersion = 300;
595597
}
596598
else if (strType == "setting")
597599
{

irc.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ bool Wait(int nSeconds)
158158

159159
void ThreadIRCSeed(void* parg)
160160
{
161+
if (mapArgs.count("-connect"))
162+
return;
163+
if (mapArgs.count("-noirc"))
164+
return;
161165
printf("ThreadIRCSeed started\n");
162166
int nErrorWait = 10;
163167
int nRetryWait = 10;

main.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -2610,6 +2610,9 @@ void BitcoinMiner()
26102610
CTransaction& tx = (*mi).second;
26112611
if (tx.IsCoinBase() || !tx.IsFinal())
26122612
continue;
2613+
unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK);
2614+
if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE - 10000)
2615+
continue;
26132616

26142617
// Transaction fee based on block size
26152618
int64 nMinFee = tx.GetMinFee(nBlockSize);
@@ -2620,7 +2623,7 @@ void BitcoinMiner()
26202623
swap(mapTestPool, mapTestPoolTmp);
26212624

26222625
pblock->vtx.push_back(tx);
2623-
nBlockSize += ::GetSerializeSize(tx, SER_NETWORK);
2626+
nBlockSize += nTxSize;
26242627
vfAlreadyAdded[n] = true;
26252628
fFoundSomething = true;
26262629
}

main.h

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class CWalletTx;
1515
class CKeyItem;
1616

1717
static const unsigned int MAX_SIZE = 0x02000000;
18+
static const unsigned int MAX_BLOCK_SIZE = 1000000;
1819
static const int64 COIN = 100000000;
1920
static const int64 CENT = 1000000;
2021
static const int COINBASE_MATURITY = 100;

makefile.unix

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ LIBS= \
2323
-Wl,-Bstatic \
2424
-l boost_system -l boost_filesystem \
2525
-l db_cxx \
26-
-Wl,-Bdynamic \
2726
-l crypto \
27+
-Wl,-Bdynamic \
2828
-l gthread-2.0
2929

3030
WXDEFS=-D__WXGTK__ -DNOPCH

serialize.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CDataStream;
2020
class CAutoFile;
2121

2222
static const int VERSION = 301;
23-
static const char* pszSubVer = ".0";
23+
static const char* pszSubVer = ".1";
2424

2525

2626

ui.cpp

+13-2
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,12 @@ void CMainFrame::OnIconize(wxIconizeEvent& event)
375375
// to get rid of the deprecated warning. Just ignore it.
376376
if (!event.Iconized())
377377
fClosedToTray = false;
378-
//#ifdef __WXMSW__
379378
// The tray icon sometimes disappears on ubuntu karmic
380379
// Hiding the taskbar button doesn't work cleanly on ubuntu lucid
380+
// Reports of CPU peg on 64-bit linux
381381
if (fMinimizeToTray && event.Iconized())
382382
fClosedToTray = true;
383383
Show(!fClosedToTray);
384-
//#endif
385384
ptaskbaricon->Show(fMinimizeToTray || fClosedToTray);
386385
}
387386

@@ -1446,6 +1445,14 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
14461445
SelectPage(0);
14471446
#ifdef __WXGTK__
14481447
m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup"));
1448+
if (!mapArgs.count("-minimizetotray"))
1449+
{
1450+
// Minimize to tray is just too buggy on Linux
1451+
fMinimizeToTray = false;
1452+
m_checkBoxMinimizeToTray->SetValue(false);
1453+
m_checkBoxMinimizeToTray->Enable(false);
1454+
m_checkBoxMinimizeOnClose->SetLabel(_("&Minimize on close"));
1455+
}
14491456
#endif
14501457
#ifdef __WXMAC_OSX__
14511458
m_checkBoxStartOnSystemStartup->Enable(false); // not implemented yet
@@ -2536,6 +2543,10 @@ void CreateMainWindow()
25362543
pframeMain = new CMainFrame(NULL);
25372544
if (mapArgs.count("-min"))
25382545
pframeMain->Iconize(true);
2546+
#ifdef __WXGTK__
2547+
if (!mapArgs.count("-minimizetotray"))
2548+
fMinimizeToTray = false;
2549+
#endif
25392550
pframeMain->Show(true); // have to show first to get taskbar button to hide
25402551
if (fMinimizeToTray && pframeMain->IsIconized())
25412552
fClosedToTray = true;

0 commit comments

Comments
 (0)