mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-16 10:29:00 +00:00
Merge branch '0.5.x' into 0.6.0.x
This commit is contained in:
commit
ff4be740b5
@ -131,7 +131,9 @@ public:
|
||||
|
||||
if (sn < (int64)0)
|
||||
{
|
||||
n = -sn;
|
||||
// Since the minimum signed integer cannot be represented as positive so long as its type is signed, and it's not well-defined what happens if you make it unsigned before negating it, we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate
|
||||
n = -(sn + 1);
|
||||
++n;
|
||||
fNegative = true;
|
||||
} else {
|
||||
n = sn;
|
||||
@ -414,7 +416,7 @@ public:
|
||||
CBigNum& operator>>=(unsigned int shift)
|
||||
{
|
||||
// Note: BN_rshift segfaults on 64-bit if 2^shift is greater than the number
|
||||
// if built on ubuntu 9.04 or 9.10, probably depends on version of openssl
|
||||
// if built on ubuntu 9.04 or 9.10, probably depends on version of OpenSSL
|
||||
CBigNum a = 1;
|
||||
a <<= shift;
|
||||
if (BN_cmp(&a, this) > 0)
|
||||
|
||||
@ -804,7 +804,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees)
|
||||
{
|
||||
int64 nSubsidy = 50 * COIN;
|
||||
|
||||
// Subsidy is cut in half every 4 years
|
||||
// Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
|
||||
nSubsidy >>= (nHeight / 210000);
|
||||
|
||||
return nSubsidy + nFees;
|
||||
|
||||
@ -96,6 +96,8 @@ void AddressBookPage::setModel(AddressTableModel *model)
|
||||
proxyModel = new QSortFilterProxyModel(this);
|
||||
proxyModel->setSourceModel(model);
|
||||
proxyModel->setDynamicSortFilter(true);
|
||||
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
switch(tab)
|
||||
{
|
||||
case ReceivingTab:
|
||||
|
||||
@ -313,6 +313,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
|
||||
this->clientModel = clientModel;
|
||||
if(clientModel)
|
||||
{
|
||||
// Replace some strings and icons, when using the testnet
|
||||
if(clientModel->isTestNet())
|
||||
{
|
||||
QString title_testnet = windowTitle() + QString(" ") + tr("[testnet]");
|
||||
@ -327,6 +328,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
|
||||
trayIcon->setToolTip(title_testnet);
|
||||
trayIcon->setIcon(QIcon(":/icons/toolbar_testnet"));
|
||||
}
|
||||
|
||||
aboutAction->setIcon(QIcon(":/icons/toolbar_testnet"));
|
||||
}
|
||||
|
||||
// Keep up to date with client
|
||||
|
||||
@ -158,6 +158,8 @@ void TransactionView::setModel(WalletModel *model)
|
||||
transactionProxyModel = new TransactionFilterProxy(this);
|
||||
transactionProxyModel->setSourceModel(model->getTransactionTableModel());
|
||||
transactionProxyModel->setDynamicSortFilter(true);
|
||||
transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
|
||||
transactionProxyModel->setSortRole(Qt::EditRole);
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ extern "C" void tss_cleanup_implemented() { }
|
||||
|
||||
|
||||
|
||||
// Init openssl library multithreading support
|
||||
// Init OpenSSL library multithreading support
|
||||
static boost::interprocess::interprocess_mutex** ppmutexOpenSSL;
|
||||
void locking_callback(int mode, int i, const char* file, int line)
|
||||
{
|
||||
@ -71,7 +71,7 @@ class CInit
|
||||
public:
|
||||
CInit()
|
||||
{
|
||||
// Init openssl library multithreading support
|
||||
// Init OpenSSL library multithreading support
|
||||
ppmutexOpenSSL = (boost::interprocess::interprocess_mutex**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(boost::interprocess::interprocess_mutex*));
|
||||
for (int i = 0; i < CRYPTO_num_locks(); i++)
|
||||
ppmutexOpenSSL[i] = new boost::interprocess::interprocess_mutex();
|
||||
@ -87,7 +87,7 @@ public:
|
||||
}
|
||||
~CInit()
|
||||
{
|
||||
// Shutdown openssl library multithreading support
|
||||
// Shutdown OpenSSL library multithreading support
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
for (int i = 0; i < CRYPTO_num_locks(); i++)
|
||||
delete ppmutexOpenSSL[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user