Merge branch 'v0.12.1.x' of http://www.github.com/dashpay/dash into v0.12.1.x

This commit is contained in:
Evan Duffield 2016-03-03 06:59:23 -07:00
commit e0021f08af
20 changed files with 116 additions and 71 deletions

View File

@ -38,8 +38,8 @@ matrix:
env: HOST=x86_64-w64-mingw32 PPA="ppa:ubuntu-wine/ppa" PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine1.7 bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2" env: HOST=x86_64-w64-mingw32 PPA="ppa:ubuntu-wine/ppa" PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine1.7 bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports" MAKEJOBS="-j2"
- compiler: ": dashd" - compiler: ": dashd"
env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc python-zmq" PPA="ppa:chris-lea/zeromq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER" env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc python-zmq" PPA="ppa:chris-lea/zeromq" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER"
- compiler: ": No wallet" # - compiler: ": No wallet"
env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" # env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
- compiler: ": Cross-Mac" - compiler: ": Cross-Mac"
env: HOST=x86_64-apple-darwin11 PACKAGES="cmake libcap-dev libz-dev libbz2-dev" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy" env: HOST=x86_64-apple-darwin11 PACKAGES="cmake libcap-dev libz-dev libbz2-dev" BITCOIN_CONFIG="--enable-reduce-exports" OSX_SDK=10.9 GOAL="deploy"
exclude: exclude:

View File

@ -339,7 +339,7 @@ Getting and building the inputs
-------------------------------- --------------------------------
Follow the instructions in [doc/release-process.md](release-process.md#fetch-and-build-inputs-first-time-or-when-dependency-versions-change) Follow the instructions in [doc/release-process.md](release-process.md#fetch-and-build-inputs-first-time-or-when-dependency-versions-change)
in the bitcoin repository under 'Fetch and build inputs' to install sources which require in the dash repository under 'Fetch and build inputs' to install sources which require
manual intervention. Also optionally follow the next step: 'Seed the Gitian sources cache manual intervention. Also optionally follow the next step: 'Seed the Gitian sources cache
and offline git repositories' which will fetch the remaining files required for building and offline git repositories' which will fetch the remaining files required for building
offline. offline.
@ -348,7 +348,7 @@ Building Dash
---------------- ----------------
To build Dash (for Linux, OS X and Windows) just follow the steps under 'perform To build Dash (for Linux, OS X and Windows) just follow the steps under 'perform
Gitian builds' in [doc/release-process.md](release-process.md#perform-gitian-builds) in the bitcoin repository. Gitian builds' in [doc/release-process.md](release-process.md#perform-gitian-builds) in the dash repository.
This may take some time as it will build all the dependencies needed for each descriptor. This may take some time as it will build all the dependencies needed for each descriptor.
These dependencies will be cached after a successful build to avoid rebuilding them when possible. These dependencies will be cached after a successful build to avoid rebuilding them when possible.
@ -405,7 +405,7 @@ Building fully offline
----------------------- -----------------------
For building fully offline including attaching signatures to unsigned builds, the detached-sigs repository For building fully offline including attaching signatures to unsigned builds, the detached-sigs repository
and the bitcoin git repository with the desired tag must both be available locally, and then gbuild must be and the dash git repository with the desired tag must both be available locally, and then gbuild must be
told where to find them. It also requires an apt-cacher-ng which is fully-populated but set to offline mode, or told where to find them. It also requires an apt-cacher-ng which is fully-populated but set to offline mode, or
manually disabling gitian-builder's use of apt-get to update the VM build environment. manually disabling gitian-builder's use of apt-get to update the VM build environment.
@ -424,7 +424,7 @@ cd /path/to/gitian-builder
LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root apt-get update LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root apt-get update
LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root \ LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root \
-e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \ -e DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
$( sed -ne '/^packages:/,/[^-] .*/ {/^- .*/{s/"//g;s/- //;p}}' ../bitcoin/contrib/gitian-descriptors/*|sort|uniq ) $( sed -ne '/^packages:/,/[^-] .*/ {/^- .*/{s/"//g;s/- //;p}}' ../dash/contrib/gitian-descriptors/*|sort|uniq )
LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root apt-get -q -y purge grub LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root apt-get -q -y purge grub
LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade LXC_ARCH=amd64 LXC_SUITE=precise on-target -u root -e DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
``` ```

View File

@ -15,7 +15,7 @@ Check out the source code in the following directory hierarchy.
git clone https://github.com/devrandom/gitian-builder.git git clone https://github.com/devrandom/gitian-builder.git
git clone https://github.com/dashpay/dash.git git clone https://github.com/dashpay/dash.git
###Bitcoin maintainers/release engineers, update (commit) version in sources ###Dash maintainers/release engineers, update (commit) version in sources
pushd ./dash pushd ./dash
contrib/verifysfbinaries/verify.sh contrib/verifysfbinaries/verify.sh
@ -82,7 +82,7 @@ Only missing files will be fetched, so this is safe to re-run for each build.
NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example: NOTE: Offline builds must use the --url flag to ensure Gitian fetches only from local URLs. For example:
``` ```
./bin/gbuild --url dash=/path/to/bitcoin,signature=/path/to/sigs {rest of arguments} ./bin/gbuild --url dash=/path/to/dash,signature=/path/to/sigs {rest of arguments}
``` ```
The gbuild invocations below <b>DO NOT DO THIS</b> by default. The gbuild invocations below <b>DO NOT DO THIS</b> by default.
@ -92,12 +92,12 @@ The gbuild invocations below <b>DO NOT DO THIS</b> by default.
./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-linux.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-linux.yml
mv build/out/dash-*.tar.gz build/out/src/dash-*.tar.gz ../ mv build/out/dash-*.tar.gz build/out/src/dash-*.tar.gz ../
./bin/gbuild --commit bitcoin=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-win.yml ./bin/gbuild --commit dash=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-win.yml
./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-win.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-win.yml
mv build/out/dash-*-win-unsigned.tar.gz inputs/dash-win-unsigned.tar.gz mv build/out/dash-*-win-unsigned.tar.gz inputs/dash-win-unsigned.tar.gz
mv build/out/dash-*.zip build/out/dash-*.exe ../ mv build/out/dash-*.zip build/out/dash-*.exe ../
./bin/gbuild --commit bitcoin=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-osx.yml ./bin/gbuild --commit dash=v${VERSION} ../dash/contrib/gitian-descriptors/gitian-osx.yml
./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-osx.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-osx.yml
mv build/out/dash-*-osx-unsigned.tar.gz inputs/dash-osx-unsigned.tar.gz mv build/out/dash-*-osx-unsigned.tar.gz inputs/dash-osx-unsigned.tar.gz
mv build/out/dash-*.tar.gz build/out/dash-*.dmg ../ mv build/out/dash-*.tar.gz build/out/dash-*.dmg ../

View File

@ -269,8 +269,8 @@ libbitcoin_wallet_a_SOURCES = \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
# crypto primitives library # crypto primitives library
crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES) crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES) $(PIC_FLAGS)
crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(PIC_FLAGS)
crypto_libbitcoin_crypto_a_SOURCES = \ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/common.h \ crypto/common.h \
crypto/hmac_sha256.cpp \ crypto/hmac_sha256.cpp \

View File

@ -161,6 +161,7 @@ BITCOIN_QT_H = \
qt/winshutdownmonitor.h qt/winshutdownmonitor.h
RES_ICONS = \ RES_ICONS = \
qt/res/icons/bitcoin.ico \
qt/res/icons/drkblue/add.png \ qt/res/icons/drkblue/add.png \
qt/res/icons/drkblue/address-book.png \ qt/res/icons/drkblue/address-book.png \
qt/res/icons/drkblue/bitcoin.ico \ qt/res/icons/drkblue/bitcoin.ico \

View File

@ -78,7 +78,7 @@ BITCOIN_TESTS =\
test/skiplist_tests.cpp \ test/skiplist_tests.cpp \
test/streams_tests.cpp \ test/streams_tests.cpp \
test/test_dash.cpp \ test/test_dash.cpp \
test/test_dash.h \ test/test_bitcoin.h \
test/timedata_tests.cpp \ test/timedata_tests.cpp \
test/transaction_tests.cpp \ test/transaction_tests.cpp \
test/txvalidationcache_tests.cpp \ test/txvalidationcache_tests.cpp \

View File

@ -69,8 +69,6 @@ void CActiveMasternode::ManageStatus()
service = CService(strMasterNodeAddr); service = CService(strMasterNodeAddr);
} }
LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());
int mainnetDefaultPort = Params(CBaseChainParams::MAIN).GetDefaultPort(); int mainnetDefaultPort = Params(CBaseChainParams::MAIN).GetDefaultPort();
if(Params().NetworkIDString() == CBaseChainParams::MAIN) { if(Params().NetworkIDString() == CBaseChainParams::MAIN) {
if(service.GetPort() != mainnetDefaultPort) { if(service.GetPort() != mainnetDefaultPort) {
@ -84,11 +82,15 @@ void CActiveMasternode::ManageStatus()
return; return;
} }
if(!ConnectNode((CAddress)service, NULL, true)){ LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());
CNode *pnode = ConnectNode((CAddress)service, NULL, false);
if(!pnode){
notCapableReason = "Could not connect to " + service.ToString(); notCapableReason = "Could not connect to " + service.ToString();
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason); LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
return; return;
} }
pnode->Release();
// Choose coins to use // Choose coins to use
CPubKey pubKeyCollateralAddress; CPubKey pubKeyCollateralAddress;

View File

@ -105,10 +105,11 @@ void CDarkSendRelay::RelayThroughNode(int nRank)
if(pmn != NULL){ if(pmn != NULL){
//printf("RelayThroughNode %s\n", pmn->addr.ToString().c_str()); //printf("RelayThroughNode %s\n", pmn->addr.ToString().c_str());
CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true); CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, false);
if(pnode){ if(pnode){
//printf("Connected\n"); //printf("Connected\n");
pnode->PushMessage("dsr", (*this)); pnode->PushMessage("dsr", (*this));
pnode->Release();
return; return;
} }
} else { } else {

View File

@ -1544,20 +1544,23 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
std::vector<COutput> vTempCoins2; std::vector<COutput> vTempCoins2;
// Try to match their denominations if possible // Try to match their denominations if possible
if (!pwalletMain->SelectCoinsByDenominations(dsq.nDenom, nValueMin, nBalanceNeedsAnonymized, vTempCoins, vTempCoins2, nValueIn, 0, nDarksendRounds)){ if (!pwalletMain->SelectCoinsByDenominations(dsq.nDenom, nValueMin, nBalanceNeedsAnonymized, vTempCoins, vTempCoins2, nValueIn, 0, nDarksendRounds)){
LogPrintf("DoAutomaticDenominating - Couldn't match denominations %d\n", dsq.nDenom); LogPrintf("DoAutomaticDenominating --- Couldn't match denominations %d\n", dsq.nDenom);
continue; continue;
} }
// connect to Masternode and submit the queue request
CNode* pnode = ConnectNode((CAddress)addr, NULL, true);
if(pnode != NULL)
{
CMasternode* pmn = mnodeman.Find(dsq.vin); CMasternode* pmn = mnodeman.Find(dsq.vin);
if(pmn == NULL) if(pmn == NULL)
{ {
LogPrintf("DoAutomaticDenominating --- dsq vin %s is not in masternode list!", dsq.vin.ToString()); LogPrintf("DoAutomaticDenominating --- dsq vin %s is not in masternode list!", dsq.vin.ToString());
continue; continue;
} }
LogPrintf("DoAutomaticDenominating --- attempt to connect to masternode from queue %s\n", pmn->addr.ToString());
lastTimeChanged = GetTimeMillis();
// connect to Masternode and submit the queue request
CNode* pnode = ConnectNode((CAddress)addr, NULL, true);
if(pnode != NULL)
{
pSubmittedToMasternode = pmn; pSubmittedToMasternode = pmn;
vecMasternodesUsed.push_back(dsq.vin); vecMasternodesUsed.push_back(dsq.vin);
sessionDenom = dsq.nDenom; sessionDenom = dsq.nDenom;
@ -1599,7 +1602,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
} }
lastTimeChanged = GetTimeMillis(); lastTimeChanged = GetTimeMillis();
LogPrintf("DoAutomaticDenominating -- attempt %d connection to Masternode %s\n", i, pmn->addr.ToString()); LogPrintf("DoAutomaticDenominating --- attempt %d connection to Masternode %s\n", i, pmn->addr.ToString());
CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true); CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true);
if(pnode != NULL){ if(pnode != NULL){
pSubmittedToMasternode = pmn; pSubmittedToMasternode = pmn;
@ -2200,7 +2203,12 @@ void ThreadCheckDarkSendPool()
{ {
if(fLiteMode) return; //disable all Darksend/Masternode related functionality if(fLiteMode) return; //disable all Darksend/Masternode related functionality
// Make this thread recognisable as the wallet flushing thread static bool fOneThread;
if (fOneThread)
return;
fOneThread = true;
// Make this thread recognisable as the Darksend/Masternode thread
RenameThread("dash-darksend"); RenameThread("dash-darksend");
unsigned int c = 0; unsigned int c = 0;

View File

@ -358,7 +358,7 @@ static bool HTTPBindAddresses(struct evhttp* http)
/** Simple wrapper to set thread name and run work queue */ /** Simple wrapper to set thread name and run work queue */
static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue) static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue)
{ {
RenameThread("bitcoin-httpworker"); RenameThread("dash-httpworker");
queue->Run(); queue->Run();
} }

View File

@ -86,10 +86,7 @@ uint64_t nPruneTarget = 0;
bool fAlerts = DEFAULT_ALERTS; bool fAlerts = DEFAULT_ALERTS;
bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT; bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT;
/** Fees smaller than this (in duffs) are considered zero fee (for relaying, mining and transaction creation) /** Fees smaller than this (in duffs) are considered zero fee (for relaying, mining and transaction creation) */
* We are ~100 times smaller then bitcoin now (2015-06-23), set minRelayTxFee only 10 times higher
* so it's still 10 times lower comparing to bitcoin.
*/
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
CTxMemPool mempool(::minRelayTxFee); CTxMemPool mempool(::minRelayTxFee);
@ -1560,7 +1557,26 @@ CAmount GetMasternodePayment(int nHeight, CAmount blockValue)
if(Params().NetworkIDString() == CBaseChainParams::TESTNET) { if(Params().NetworkIDString() == CBaseChainParams::TESTNET) {
// BUG: there had to be `return` at the end of this `if` but we continued to add mainnet %s, // BUG: there had to be `return` at the end of this `if` but we continued to add mainnet %s,
// TODO: RESTART TESTNET and remove this quick fix // TODO: RESTART TESTNET and remove this quick fix
ret += blockValue * 10 / 20; // ret += blockValue * 10 / 20;
// from old testnet code
if(nHeight > 46000) ret += blockValue / 20; //25% - 2014-10-07
if(nHeight > 46000+((576*1)*1)) ret += blockValue / 20; //30% - 2014-10-08
if(nHeight > 46000+((576*1)*2)) ret += blockValue / 20; //35% - 2014-10-09
if(nHeight > 46000+((576*1)*3)) ret += blockValue / 20; //40% - 2014-10-10
if(nHeight > 46000+((576*1)*4)) ret += blockValue / 20; //45% - 2014-10-11
if(nHeight > 46000+((576*1)*5)) ret += blockValue / 20; //50% - 2014-10-12
if(nHeight > 46000+((576*1)*6)) ret += blockValue / 20; //55% - 2014-10-13
if(nHeight > 46000+((576*1)*7)) ret += blockValue / 20; //60% - 2014-10-14
//from old mainnet code
if(nHeight > 158000) ret += blockValue / 20; // 158000 - 25.0% - 2014-10-24
if(nHeight > 158000+((576*30)* 1)) ret += blockValue / 20; // 175280 - 30.0% - 2014-11-25
if(nHeight > 158000+((576*30)* 2)) ret += blockValue / 20; // 192560 - 35.0% - 2014-12-26
if(nHeight > 158000+((576*30)* 3)) ret += blockValue / 40; // 209840 - 37.5% - 2015-01-26
if(nHeight > 158000+((576*30)* 4)) ret += blockValue / 40; // 227120 - 40.0% - 2015-02-27
if(nHeight > 158000+((576*30)* 5)) ret += blockValue / 40; // 244400 - 42.5% - 2015-03-30
if(nHeight > 158000+((576*30)* 6)) ret += blockValue / 40; // 261680 - 45.0% - 2015-05-01
if(nHeight > 158000+((576*30)* 7)) ret += blockValue / 40; // 278960 - 47.5% - 2015-06-01
if(nHeight > 158000+((576*30)* 9)) ret += blockValue / 40; // 313520 - 50.0% - 2015-08-03
return ret; return ret;
} }

View File

@ -47,8 +47,11 @@ static const bool DEFAULT_ALERTS = true;
static const bool DEFAULT_WHITELISTRELAY = true; static const bool DEFAULT_WHITELISTRELAY = true;
/** Default for DEFAULT_WHITELISTFORCERELAY. */ /** Default for DEFAULT_WHITELISTFORCERELAY. */
static const bool DEFAULT_WHITELISTFORCERELAY = true; static const bool DEFAULT_WHITELISTFORCERELAY = true;
/** Default for -minrelaytxfee, minimum relay fee for transactions */ /** Default for -minrelaytxfee, minimum relay fee for transactions
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 10000; * We are ~100 times smaller then bitcoin now (2016-03-01), set minRelayTxFee only 10 times higher
* so it's still 10 times lower comparing to bitcoin.
*/
static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 10000; // was 1000
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */ /** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100; static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
/** Default for -limitancestorcount, max number of in-mempool ancestors */ /** Default for -limitancestorcount, max number of in-mempool ancestors */

View File

@ -669,7 +669,8 @@ void CMasternodeMan::ProcessMasternodeConnections()
if(pnode->fDarkSendMaster){ if(pnode->fDarkSendMaster){
if(darkSendPool.pSubmittedToMasternode != NULL && pnode->addr == darkSendPool.pSubmittedToMasternode->addr) continue; if(darkSendPool.pSubmittedToMasternode != NULL && pnode->addr == darkSendPool.pSubmittedToMasternode->addr) continue;
LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString()); LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString());
pnode->fDisconnect = true; pnode->fDarkSendMaster = false;
pnode->Release();
} }
} }
} }

View File

@ -355,6 +355,11 @@ public:
// b) the peer may tell us in its version message that we should not relay tx invs // b) the peer may tell us in its version message that we should not relay tx invs
// unless it loads a bloom filter. // unless it loads a bloom filter.
bool fRelayTxes; bool fRelayTxes;
// Should be 'true' only if we connected to this node to actually mix funds.
// In this case node will be released automatically via CMasternodeMan::ProcessMasternodeConnections().
// Connecting to verify connectability/status or connecting for sending/relaying single message
// (even if it's relative to mixing e.g. for blinding) should NOT set this to 'true'.
// For such cases node should be released manually (preferably right after corresponding code).
bool fDarkSendMaster; bool fDarkSendMaster;
CSemaphoreGrant grantOutbound; CSemaphoreGrant grantOutbound;
CCriticalSection cs_filter; CCriticalSection cs_filter;

View File

@ -201,6 +201,9 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n
labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}"); labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}");
labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE); labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
// Jump to peers tab by clicking on connections icon
connect(labelConnectionsIcon, SIGNAL(clicked()), this, SLOT(showPeers()));
labelBlocksIcon = new QLabel(); labelBlocksIcon = new QLabel();
if(enableWallet) if(enableWallet)
{ {
@ -414,9 +417,6 @@ void BitcoinGUI::createActions()
connect(openMNConfEditorAction, SIGNAL(triggered()), this, SLOT(showMNConfEditor())); connect(openMNConfEditorAction, SIGNAL(triggered()), this, SLOT(showMNConfEditor()));
connect(showBackupsAction, SIGNAL(triggered()), this, SLOT(showBackups())); connect(showBackupsAction, SIGNAL(triggered()), this, SLOT(showBackups()));
// Jump to peers tab by clicking on connections icon
connect(labelConnectionsIcon, SIGNAL(clicked()), this, SLOT(showPeers()));
// Get restart command-line parameters and handle restart // Get restart command-line parameters and handle restart
connect(rpcConsole, SIGNAL(handleRestart(QStringList)), this, SLOT(handleRestart(QStringList))); connect(rpcConsole, SIGNAL(handleRestart(QStringList)), this, SLOT(handleRestart(QStringList)));

View File

@ -19,7 +19,7 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex) BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN BEGIN
VALUE "CompanyName", "Dash" VALUE "CompanyName", "Dash"
VALUE "FileDescription", "Dash Core (GUI node for Bitcoin)" VALUE "FileDescription", "Dash Core (GUI node for Dash)"
VALUE "FileVersion", VER_FILEVERSION_STR VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "dash-qt" VALUE "InternalName", "dash-qt"
VALUE "LegalCopyright", COPYRIGHT_STR VALUE "LegalCopyright", COPYRIGHT_STR

View File

@ -137,7 +137,9 @@ UniValue masternode(const UniValue& params, bool fHelp)
CService addr = CService(strAddress); CService addr = CService(strAddress);
if(ConnectNode((CAddress)addr, NULL, true)){ CNode *pnode = ConnectNode((CAddress)addr, NULL, false);
if(pnode){
pnode->Release();
return "successfully connected"; return "successfully connected";
} else { } else {
throw runtime_error("error connecting\n"); throw runtime_error("error connecting\n");

View File

@ -15,47 +15,51 @@ BOOST_FIXTURE_TEST_SUITE(main_tests, TestingSetup)
static void TestBlockSubsidyHalvings(const Consensus::Params& consensusParams) static void TestBlockSubsidyHalvings(const Consensus::Params& consensusParams)
{ {
int maxHalvings = 64; // tested in dash_tests.cpp
CAmount nInitialSubsidy = 50 * COIN; //int maxHalvings = 64;
//CAmount nInitialSubsidy = 50 * COIN;
CAmount nPreviousSubsidy = nInitialSubsidy * 2; // for height == 0 //CAmount nPreviousSubsidy = nInitialSubsidy * 2; // for height == 0
BOOST_CHECK_EQUAL(nPreviousSubsidy, nInitialSubsidy * 2); //BOOST_CHECK_EQUAL(nPreviousSubsidy, nInitialSubsidy * 2);
for (int nHalvings = 0; nHalvings < maxHalvings; nHalvings++) { //for (int nHalvings = 0; nHalvings < maxHalvings; nHalvings++) {
int nHeight = nHalvings * consensusParams.nSubsidyHalvingInterval; // int nHeight = nHalvings * consensusParams.nSubsidyHalvingInterval;
CAmount nSubsidy = GetBlockSubsidy(0, nHeight, consensusParams); // CAmount nSubsidy = GetBlockSubsidy(0, nHeight, consensusParams);
BOOST_CHECK(nSubsidy <= nInitialSubsidy); // BOOST_CHECK(nSubsidy <= nInitialSubsidy);
BOOST_CHECK_EQUAL(nSubsidy, nPreviousSubsidy / 2); // BOOST_CHECK_EQUAL(nSubsidy, nPreviousSubsidy / 2);
nPreviousSubsidy = nSubsidy; // nPreviousSubsidy = nSubsidy;
} //}
BOOST_CHECK_EQUAL(GetBlockSubsidy(0, maxHalvings * consensusParams.nSubsidyHalvingInterval, consensusParams), 0); //BOOST_CHECK_EQUAL(GetBlockSubsidy(0, maxHalvings * consensusParams.nSubsidyHalvingInterval, consensusParams), 0);
} }
static void TestBlockSubsidyHalvings(int nSubsidyHalvingInterval) static void TestBlockSubsidyHalvings(int nSubsidyHalvingInterval)
{ {
Consensus::Params consensusParams; // tested in dash_tests.cpp
consensusParams.nSubsidyHalvingInterval = nSubsidyHalvingInterval; //Consensus::Params consensusParams;
TestBlockSubsidyHalvings(consensusParams); //consensusParams.nSubsidyHalvingInterval = nSubsidyHalvingInterval;
//TestBlockSubsidyHalvings(consensusParams);
} }
BOOST_AUTO_TEST_CASE(block_subsidy_test) BOOST_AUTO_TEST_CASE(block_subsidy_test)
{ {
TestBlockSubsidyHalvings(Params(CBaseChainParams::MAIN).GetConsensus()); // As in main // tested in dash_tests.cpp
TestBlockSubsidyHalvings(150); // As in regtest //TestBlockSubsidyHalvings(Params(CBaseChainParams::MAIN).GetConsensus()); // As in main
TestBlockSubsidyHalvings(1000); // Just another interval //TestBlockSubsidyHalvings(150); // As in regtest
//TestBlockSubsidyHalvings(1000); // Just another interval
} }
BOOST_AUTO_TEST_CASE(subsidy_limit_test) BOOST_AUTO_TEST_CASE(subsidy_limit_test)
{ {
const Consensus::Params& consensusParams = Params(CBaseChainParams::MAIN).GetConsensus(); // tested in dash_tests.cpp
CAmount nSum = 0; //const Consensus::Params& consensusParams = Params(CBaseChainParams::MAIN).GetConsensus();
for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) { //CAmount nSum = 0;
/* @TODO fix subsidity, add nBits */ //for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
CAmount nSubsidy = GetBlockSubsidy(0, nHeight, consensusParams); // /* @TODO fix subsidity, add nBits */
BOOST_CHECK(nSubsidy <= 25 * COIN); // CAmount nSubsidy = GetBlockSubsidy(0, nHeight, consensusParams);
nSum += nSubsidy * 1000; // BOOST_CHECK(nSubsidy <= 25 * COIN);
BOOST_CHECK(MoneyRange(nSum)); // nSum += nSubsidy * 1000;
} // BOOST_CHECK(MoneyRange(nSum));
BOOST_CHECK_EQUAL(nSum, 1350824726649000ULL); //}
//BOOST_CHECK_EQUAL(nSum, 1350824726649000ULL);
} }
bool ReturnFalse() { return false; } bool ReturnFalse() { return false; }

View File

@ -51,8 +51,6 @@ bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
/** /**
* Fees smaller than this (in duffs) are considered zero fee (for transaction creation) * Fees smaller than this (in duffs) are considered zero fee (for transaction creation)
* We are ~100 times smaller then bitcoin now (2015-06-23), set minTxFee 10 times higher
* so it's still 10 times lower comparing to bitcoin.
* Override with -mintxfee * Override with -mintxfee
*/ */
CFeeRate CWallet::minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE); CFeeRate CWallet::minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE);

View File

@ -49,7 +49,11 @@ static const CAmount nHighTransactionFeeWarning = 0.01 * COIN;
//! -fallbackfee default //! -fallbackfee default
static const CAmount DEFAULT_FALLBACK_FEE = 20000; static const CAmount DEFAULT_FALLBACK_FEE = 20000;
//! -mintxfee default //! -mintxfee default
static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000; /**
* We are ~100 times smaller then bitcoin now (2016-03-01), set minTxFee 10 times higher
* so it's still 10 times lower comparing to bitcoin.
*/
static const CAmount DEFAULT_TRANSACTION_MINFEE = 10000; // was 1000
//! -maxtxfee default //! -maxtxfee default
static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN; static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
//! minimum change amount //! minimum change amount