Skip to content

Commit

Permalink
fix openssl linkage problems,
Browse files Browse the repository at this point in the history
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
  • Loading branch information
non-github-bitcoin committed Jul 15, 2010
1 parent 6e5d67e commit a30b56e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 5 deletions.
2 changes: 2 additions & 0 deletions db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ bool CWalletDB::LoadWallet()
else if (strType == "version")
{
ssValue >> nFileVersion;
if (nFileVersion == 10300)
nFileVersion = 300;
}
else if (strType == "setting")
{
Expand Down
4 changes: 4 additions & 0 deletions irc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class CWalletTx;
class CKeyItem;

static const unsigned int MAX_SIZE = 0x02000000;
static const unsigned int MAX_BLOCK_SIZE = 1000000;

This comment has been minimized.

Copy link
@marceljay

marceljay May 2, 2020

This counts as hidden?

static const int64 COIN = 100000000;
static const int64 CENT = 1000000;
static const int COINBASE_MATURITY = 100;
Expand Down
2 changes: 1 addition & 1 deletion makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CDataStream;
class CAutoFile;

static const int VERSION = 301;
static const char* pszSubVer = ".0";
static const char* pszSubVer = ".1";



Expand Down
15 changes: 13 additions & 2 deletions ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

1 comment on commit a30b56e

@marceljay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Please sign in to comment.