Skip to content

Commit

Permalink
v1.0.0.3
Browse files Browse the repository at this point in the history
Completely remove selection by coin age.
Don't process transactions we already have
Checkpoint at block 10,000
  • Loading branch information
[email protected] committed Jun 22, 2016
1 parent 0afd855 commit 1f1a7c2
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 297 deletions.
4 changes: 2 additions & 2 deletions Syndicate.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = Syndicate-qt
VERSION = 1.0.0.2
VERSION = 1.0.0.3
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
QT += network printsupport
DEFINES += ENABLE_WALLET
Expand All @@ -17,7 +17,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
# use: qmake BOOST_LIB_SUFFIX=-mt
# for boost thread win32 with _win32 sufix
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8

# Dependency library locations can be customized with:
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
Expand Down
3 changes: 2 additions & 1 deletion src/checkpoints.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -29,6 +29,7 @@ namespace Checkpoints
boost::assign::map_list_of
( 0, Params().HashGenesisBlock() )
( 1000, uint256("0x47aebcfdd0b3f23e8cc153ed322e53d1706822784942726adae2c18de4cb1408"))
( 10000, uint256("0x47aebcfdd0b3f23e8cc153ed322e53d1706822784942726adae2c18de4cb1408"))
;

// TestNet has no checkpoints
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
3 changes: 0 additions & 3 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ int nWalletBackups = 10;
#endif
CClientUIInterface uiInterface;
bool fConfChange;
bool fMinimizeCoinAge;
unsigned int nNodeLifespan;
unsigned int nDerivationMethodIndex;
unsigned int nMinerSleep;
Expand Down Expand Up @@ -256,7 +255,6 @@ std::string HelpMessage()
strUsage += " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
strUsage += " -walletnotify=<cmd> " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
strUsage += " -confchange " + _("Require a confirmations for change (default: 0)") + "\n";
strUsage += " -minimizecoinage " + _("Minimize weight consumption (experimental) (default: 0)") + "\n";
strUsage += " -alertnotify=<cmd> " + _("Execute command when a relevant alert is received (%s in cmd is replaced by message)") + "\n";
strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + "\n";
strUsage += " -createwalletbackups=<n> " + _("Number of automatic wallet backups (default: 10)") + "\n";
Expand Down Expand Up @@ -490,7 +488,6 @@ bool AppInit2(boost::thread_group& threadGroup)
#endif

fConfChange = GetBoolArg("-confchange", false);
fMinimizeCoinAge = GetBoolArg("-minimizecoinage", false);

#ifdef ENABLE_WALLET
if (mapArgs.count("-mininput"))
Expand Down
11 changes: 10 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3810,10 +3810,20 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
CTxIn vin;
vector<unsigned char> vchSig;
int64_t sigTime;
CInv inv;
CTxDB txdb("r");

if(strCommand == "tx") {
CInv inv(MSG_TX, tx.GetHash());
// Check for recently rejected (and do other quick existence checks)
if (AlreadyHave(txdb, inv))
return true;
vRecv >> tx;
} else if (strCommand == "dstx") {
CInv inv(MSG_DSTX, tx.GetHash());
// Check for recently rejected (and do other quick existence checks)
if (AlreadyHave(txdb, inv))
return true;
//these allow masternodes to publish a limited amount of free transactions
vRecv >> tx >> vin >> vchSig >> sigTime;

Expand Down Expand Up @@ -3852,7 +3862,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
}

CInv inv(MSG_TX, tx.GetHash());
pfrom->AddInventoryKnown(inv);

LOCK(cs_main);
Expand Down
3 changes: 0 additions & 3 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ extern bool fHaveGUI;
// Settings
extern bool fUseFastIndex;
extern unsigned int nDerivationMethodIndex;

extern bool fMinimizeCoinAge;

extern bool fLargeWorkForkFound;
extern bool fLargeWorkInvalidChainFound;

Expand Down
10 changes: 0 additions & 10 deletions src/qt/forms/optionsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="minimizeCoinAge">
<property name="toolTip">
<string>Whether to select the coin outputs randomly or with minimal coin age.</string>
</property>
<property name="text">
<string>Minimize weight consumption (experimental)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="useBlackTheme">
<property name="text">
Expand Down
1 change: 0 additions & 1 deletion src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ void OptionsDialog::setMapper()
mapper->addMapping(ui->lang, OptionsModel::Language);
mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
mapper->addMapping(ui->minimizeCoinAge, OptionsModel::MinimizeCoinAge);
mapper->addMapping(ui->useBlackTheme, OptionsModel::UseBlackTheme);

/* Darksend Rounds */
Expand Down
10 changes: 1 addition & 9 deletions src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "optionsmodel.h"
#include "optionsmodel.h"

#include "bitcoinunits.h"
#include "init.h"
Expand Down Expand Up @@ -63,8 +63,6 @@ void OptionsModel::Init()
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("fMinimizeCoinAge"))
SoftSetBoolArg("-minimizecoinage", settings.value("fMinimizeCoinAge").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());

Expand Down Expand Up @@ -124,8 +122,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return QVariant(nDarksendRounds);
case AnonymizeSyndicateAmount:
return QVariant(nAnonymizeSyndicateAmount);
case MinimizeCoinAge:
return settings.value("fMinimizeCoinAge", GetBoolArg("-minimizecoinage", false));
case UseBlackTheme:
return QVariant(fUseBlackTheme);
default:
Expand Down Expand Up @@ -207,10 +203,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
emit coinControlFeaturesChanged(fCoinControlFeatures);
}
break;
case MinimizeCoinAge:
fMinimizeCoinAge = value.toBool();
settings.setValue("fMinimizeCoinAge", fMinimizeCoinAge);
break;
case UseBlackTheme:
fUseBlackTheme = value.toBool();
settings.setValue("fUseBlackTheme", fUseBlackTheme);
Expand Down
1 change: 0 additions & 1 deletion src/qt/optionsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class OptionsModel : public QAbstractListModel
DisplayUnit, // BitcoinUnits::Unit
Language, // QString
CoinControlFeatures, // bool
MinimizeCoinAge, // bool
UseBlackTheme, // bool
DarksendRounds, // int
AnonymizeSyndicateAmount, //int
Expand Down
Loading

0 comments on commit 1f1a7c2

Please sign in to comment.