Skip to content

Commit 1f1a7c2

Browse files
author
development@syndicatelabs.org
committed
v1.0.0.3
Completely remove selection by coin age. Don't process transactions we already have Checkpoint at block 10,000
1 parent 0afd855 commit 1f1a7c2

13 files changed

Lines changed: 18 additions & 297 deletions

Syndicate.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEMPLATE = app
22
TARGET = Syndicate-qt
3-
VERSION = 1.0.0.2
3+
VERSION = 1.0.0.3
44
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
55
QT += network printsupport
66
DEFINES += ENABLE_WALLET
@@ -17,7 +17,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
1717
# use: qmake BOOST_LIB_SUFFIX=-mt
1818
# for boost thread win32 with _win32 sufix
1919
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
20-
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
20+
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
2121

2222
# Dependency library locations can be customized with:
2323
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,

src/checkpoints.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2009-2012 The Bitcoin developers
1+
// Copyright (c) 2009-2012 The Bitcoin developers
22
// Distributed under the MIT/X11 software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

@@ -29,6 +29,7 @@ namespace Checkpoints
2929
boost::assign::map_list_of
3030
( 0, Params().HashGenesisBlock() )
3131
( 1000, uint256("0x47aebcfdd0b3f23e8cc153ed322e53d1706822784942726adae2c18de4cb1408"))
32+
( 10000, uint256("0x47aebcfdd0b3f23e8cc153ed322e53d1706822784942726adae2c18de4cb1408"))
3233
;
3334

3435
// TestNet has no checkpoints

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 0
1111
#define CLIENT_VERSION_REVISION 0
12-
#define CLIENT_VERSION_BUILD 2
12+
#define CLIENT_VERSION_BUILD 3
1313

1414
// Set to true for release, false for prerelease or test build
1515
#define CLIENT_VERSION_IS_RELEASE true

src/init.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ int nWalletBackups = 10;
5151
#endif
5252
CClientUIInterface uiInterface;
5353
bool fConfChange;
54-
bool fMinimizeCoinAge;
5554
unsigned int nNodeLifespan;
5655
unsigned int nDerivationMethodIndex;
5756
unsigned int nMinerSleep;
@@ -256,7 +255,6 @@ std::string HelpMessage()
256255
strUsage += " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
257256
strUsage += " -walletnotify=<cmd> " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
258257
strUsage += " -confchange " + _("Require a confirmations for change (default: 0)") + "\n";
259-
strUsage += " -minimizecoinage " + _("Minimize weight consumption (experimental) (default: 0)") + "\n";
260258
strUsage += " -alertnotify=<cmd> " + _("Execute command when a relevant alert is received (%s in cmd is replaced by message)") + "\n";
261259
strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + "\n";
262260
strUsage += " -createwalletbackups=<n> " + _("Number of automatic wallet backups (default: 10)") + "\n";
@@ -490,7 +488,6 @@ bool AppInit2(boost::thread_group& threadGroup)
490488
#endif
491489

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

495492
#ifdef ENABLE_WALLET
496493
if (mapArgs.count("-mininput"))

src/main.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3810,10 +3810,20 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
38103810
CTxIn vin;
38113811
vector<unsigned char> vchSig;
38123812
int64_t sigTime;
3813+
CInv inv;
3814+
CTxDB txdb("r");
38133815

38143816
if(strCommand == "tx") {
3817+
CInv inv(MSG_TX, tx.GetHash());
3818+
// Check for recently rejected (and do other quick existence checks)
3819+
if (AlreadyHave(txdb, inv))
3820+
return true;
38153821
vRecv >> tx;
38163822
} else if (strCommand == "dstx") {
3823+
CInv inv(MSG_DSTX, tx.GetHash());
3824+
// Check for recently rejected (and do other quick existence checks)
3825+
if (AlreadyHave(txdb, inv))
3826+
return true;
38173827
//these allow masternodes to publish a limited amount of free transactions
38183828
vRecv >> tx >> vin >> vchSig >> sigTime;
38193829

@@ -3852,7 +3862,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
38523862
}
38533863
}
38543864

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

38583867
LOCK(cs_main);

src/main.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ extern bool fHaveGUI;
106106
// Settings
107107
extern bool fUseFastIndex;
108108
extern unsigned int nDerivationMethodIndex;
109-
110-
extern bool fMinimizeCoinAge;
111-
112109
extern bool fLargeWorkForkFound;
113110
extern bool fLargeWorkInvalidChainFound;
114111

src/qt/forms/optionsdialog.ui

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -420,16 +420,6 @@
420420
</property>
421421
</widget>
422422
</item>
423-
<item>
424-
<widget class="QCheckBox" name="minimizeCoinAge">
425-
<property name="toolTip">
426-
<string>Whether to select the coin outputs randomly or with minimal coin age.</string>
427-
</property>
428-
<property name="text">
429-
<string>Minimize weight consumption (experimental)</string>
430-
</property>
431-
</widget>
432-
</item>
433423
<item>
434424
<widget class="QCheckBox" name="useBlackTheme">
435425
<property name="text">

src/qt/optionsdialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ void OptionsDialog::setMapper()
139139
mapper->addMapping(ui->lang, OptionsModel::Language);
140140
mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
141141
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
142-
mapper->addMapping(ui->minimizeCoinAge, OptionsModel::MinimizeCoinAge);
143142
mapper->addMapping(ui->useBlackTheme, OptionsModel::UseBlackTheme);
144143

145144
/* Darksend Rounds */

src/qt/optionsmodel.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "optionsmodel.h"
1+
#include "optionsmodel.h"
22

33
#include "bitcoinunits.h"
44
#include "init.h"
@@ -63,8 +63,6 @@ void OptionsModel::Init()
6363
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
6464
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
6565
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
66-
if (settings.contains("fMinimizeCoinAge"))
67-
SoftSetBoolArg("-minimizecoinage", settings.value("fMinimizeCoinAge").toBool());
6866
if (!language.isEmpty())
6967
SoftSetArg("-lang", language.toStdString());
7068

@@ -124,8 +122,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
124122
return QVariant(nDarksendRounds);
125123
case AnonymizeSyndicateAmount:
126124
return QVariant(nAnonymizeSyndicateAmount);
127-
case MinimizeCoinAge:
128-
return settings.value("fMinimizeCoinAge", GetBoolArg("-minimizecoinage", false));
129125
case UseBlackTheme:
130126
return QVariant(fUseBlackTheme);
131127
default:
@@ -207,10 +203,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
207203
emit coinControlFeaturesChanged(fCoinControlFeatures);
208204
}
209205
break;
210-
case MinimizeCoinAge:
211-
fMinimizeCoinAge = value.toBool();
212-
settings.setValue("fMinimizeCoinAge", fMinimizeCoinAge);
213-
break;
214206
case UseBlackTheme:
215207
fUseBlackTheme = value.toBool();
216208
settings.setValue("fUseBlackTheme", fUseBlackTheme);

src/qt/optionsmodel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class OptionsModel : public QAbstractListModel
3131
DisplayUnit, // BitcoinUnits::Unit
3232
Language, // QString
3333
CoinControlFeatures, // bool
34-
MinimizeCoinAge, // bool
3534
UseBlackTheme, // bool
3635
DarksendRounds, // int
3736
AnonymizeSyndicateAmount, //int

0 commit comments

Comments
 (0)