Merge branch 'v0.11.0.x' of https://github.com/darkcoin/darkcoin into v0.11.0.x
This commit is contained in:
commit
515841eb1e
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
|||||||
define(_CLIENT_VERSION_MAJOR, 0)
|
define(_CLIENT_VERSION_MAJOR, 0)
|
||||||
define(_CLIENT_VERSION_MINOR, 11)
|
define(_CLIENT_VERSION_MINOR, 11)
|
||||||
define(_CLIENT_VERSION_REVISION, 0)
|
define(_CLIENT_VERSION_REVISION, 0)
|
||||||
define(_CLIENT_VERSION_BUILD, 3)
|
define(_CLIENT_VERSION_BUILD, 4)
|
||||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||||
define(_COPYRIGHT_YEAR, 2015)
|
define(_COPYRIGHT_YEAR, 2015)
|
||||||
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])
|
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define CLIENT_VERSION_MAJOR 0
|
#define CLIENT_VERSION_MAJOR 0
|
||||||
#define CLIENT_VERSION_MINOR 11
|
#define CLIENT_VERSION_MINOR 11
|
||||||
#define CLIENT_VERSION_REVISION 0
|
#define CLIENT_VERSION_REVISION 0
|
||||||
#define CLIENT_VERSION_BUILD 3
|
#define CLIENT_VERSION_BUILD 4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define START_MASTERNODE_PAYMENTS_TESTNET 1403568776 //Tue, 24 Jun 2014 00:12:56 GMT
|
#define START_MASTERNODE_PAYMENTS_TESTNET 1420837558 //Fri, 09 Jan 2015 21:05:58 GMT
|
||||||
#define START_MASTERNODE_PAYMENTS 1403728576 //Wed, 25 Jun 2014 20:36:16 GMT
|
#define START_MASTERNODE_PAYMENTS 1403728576 //Wed, 25 Jun 2014 20:36:16 GMT
|
||||||
|
|
||||||
static const int64_t DARKSEND_COLLATERAL = (0.1*COIN);
|
static const int64_t DARKSEND_COLLATERAL = (0.1*COIN);
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
// to spend something, then we consider it dust.
|
// to spend something, then we consider it dust.
|
||||||
// A typical txout is 34 bytes big, and will
|
// A typical txout is 34 bytes big, and will
|
||||||
// need a CTxIn of at least 148 bytes to spend,
|
// need a CTxIn of at least 148 bytes to spend,
|
||||||
// so dust is a txout less than 546 satoshis
|
// so dust is a txout less than 546 satoshis
|
||||||
// with default nMinRelayTxFee.
|
// with default nMinRelayTxFee.
|
||||||
return ((nValue*1000)/(3*((int)GetSerializeSize(SER_DISK,0)+148)) < nMinRelayTxFee);
|
return ((nValue*1000)/(3*((int)GetSerializeSize(SER_DISK,0)+148)) < nMinRelayTxFee);
|
||||||
}
|
}
|
||||||
|
@ -435,6 +435,7 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
|
|||||||
void CDarkSendPool::Reset(){
|
void CDarkSendPool::Reset(){
|
||||||
cachedLastSuccess = 0;
|
cachedLastSuccess = 0;
|
||||||
vecMasternodesUsed.clear();
|
vecMasternodesUsed.clear();
|
||||||
|
UnlockCoins();
|
||||||
SetNull();
|
SetNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1675,7 +1676,7 @@ bool CDarkSendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
|
|||||||
if(!ready) return true;
|
if(!ready) return true;
|
||||||
|
|
||||||
if(sessionDenom == 0) return true;
|
if(sessionDenom == 0) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2918,7 +2918,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
|
|||||||
CBitcoinAddress address2(address1);
|
CBitcoinAddress address2(address1);
|
||||||
|
|
||||||
LogPrintf("CheckBlock() : Couldn't find masternode payment(%d|%d) or payee(%d|%s) nHeight %d. \n", foundPaymentAmount, masternodePaymentAmount, foundPayee, address2.ToString().c_str(), chainActive.Tip()->nHeight+1);
|
LogPrintf("CheckBlock() : Couldn't find masternode payment(%d|%d) or payee(%d|%s) nHeight %d. \n", foundPaymentAmount, masternodePaymentAmount, foundPayee, address2.ToString().c_str(), chainActive.Tip()->nHeight+1);
|
||||||
if(!TestNet() && !RegTest()) return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
|
if(!RegTest()) return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
#include "net.h"
|
||||||
#include "masternodeconfig.h"
|
#include "masternodeconfig.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
@ -26,6 +28,13 @@ bool CMasternodeConfig::read(boost::filesystem::path path, std::string& strErr)
|
|||||||
streamConfig.close();
|
streamConfig.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(CService(ip).GetPort() != 19999 && CService(ip).GetPort() != 9999) {
|
||||||
|
strErr = "Invalid port (must be 9999 for mainnet or 19999 for testnet) detected in masternode.conf: " + line;
|
||||||
|
streamConfig.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
add(alias, ip, privKey, txHash, outputIndex);
|
add(alias, ip, privKey, txHash, outputIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +85,23 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|||||||
|
|
||||||
if (fAllFromMe && fAllToMe)
|
if (fAllFromMe && fAllToMe)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
|
||||||
|
{
|
||||||
|
const CTxOut& txout = wtx.vout[nOut];
|
||||||
|
TransactionRecord sub(hash, nTime);
|
||||||
|
sub.idx = parts.size();
|
||||||
|
|
||||||
|
if(txout.nValue == (DARKSEND_COLLATERAL*2)+DARKSEND_FEE ||
|
||||||
|
txout.nValue == (DARKSEND_COLLATERAL*2)+DARKSEND_FEE ||
|
||||||
|
txout.nValue == (DARKSEND_COLLATERAL*3)+DARKSEND_FEE ||
|
||||||
|
txout.nValue == (DARKSEND_COLLATERAL*4)+DARKSEND_FEE ||
|
||||||
|
txout.nValue == (DARKSEND_COLLATERAL*5)+DARKSEND_FEE
|
||||||
|
) {
|
||||||
|
sub.type = TransactionRecord::DarksendSplitUpLarge;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Payment to self
|
// Payment to self
|
||||||
int64_t nChange = wtx.GetChange();
|
int64_t nChange = wtx.GetChange();
|
||||||
|
|
||||||
@ -125,6 +142,17 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|||||||
sub.address = mapValue["to"];
|
sub.address = mapValue["to"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(wtx.IsDenominated()){
|
||||||
|
sub.type = TransactionRecord::Darksent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(txout.nValue == DARKSEND_COLLATERAL){
|
||||||
|
sub.type = TransactionRecord::DarksendCollateralPayment;
|
||||||
|
}
|
||||||
|
if(txout.nValue == DARKSEND_COLLATERAL*5){
|
||||||
|
sub.type = TransactionRecord::DarksendSplitUpLarge;
|
||||||
|
}
|
||||||
|
|
||||||
int64_t nValue = txout.nValue;
|
int64_t nValue = txout.nValue;
|
||||||
/* Add fee to first output */
|
/* Add fee to first output */
|
||||||
if (nTxFee > 0)
|
if (nTxFee > 0)
|
||||||
@ -142,7 +170,18 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|||||||
//
|
//
|
||||||
// Mixed debit transaction, can't break down payees
|
// Mixed debit transaction, can't break down payees
|
||||||
//
|
//
|
||||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0));
|
bool isDarksent = false;
|
||||||
|
|
||||||
|
for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
|
||||||
|
{
|
||||||
|
const CTxOut& txout = wtx.vout[nOut];
|
||||||
|
|
||||||
|
BOOST_FOREACH(int64_t d, darkSendDenominations)
|
||||||
|
if(txout.nValue == d)
|
||||||
|
isDarksent = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
parts.append(TransactionRecord(hash, nTime, isDarksent ? TransactionRecord::DarksendDenominate : TransactionRecord::Other, "", nNet, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,12 @@ public:
|
|||||||
SendToOther,
|
SendToOther,
|
||||||
RecvWithAddress,
|
RecvWithAddress,
|
||||||
RecvFromOther,
|
RecvFromOther,
|
||||||
SendToSelf
|
SendToSelf,
|
||||||
|
RecvWithDarksend,
|
||||||
|
DarksendDenominate,
|
||||||
|
DarksendCollateralPayment,
|
||||||
|
DarksendSplitUpLarge,
|
||||||
|
Darksent
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Number of confirmation recommended for accepting a transaction */
|
/** Number of confirmation recommended for accepting a transaction */
|
||||||
|
@ -356,6 +356,8 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
|
|||||||
return tr("Received with");
|
return tr("Received with");
|
||||||
case TransactionRecord::RecvFromOther:
|
case TransactionRecord::RecvFromOther:
|
||||||
return tr("Received from");
|
return tr("Received from");
|
||||||
|
case TransactionRecord::RecvWithDarksend:
|
||||||
|
return tr("Received via Darksend");
|
||||||
case TransactionRecord::SendToAddress:
|
case TransactionRecord::SendToAddress:
|
||||||
case TransactionRecord::SendToOther:
|
case TransactionRecord::SendToOther:
|
||||||
return tr("Sent to");
|
return tr("Sent to");
|
||||||
@ -363,6 +365,16 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
|
|||||||
return tr("Payment to yourself");
|
return tr("Payment to yourself");
|
||||||
case TransactionRecord::Generated:
|
case TransactionRecord::Generated:
|
||||||
return tr("Mined");
|
return tr("Mined");
|
||||||
|
|
||||||
|
case TransactionRecord::DarksendDenominate:
|
||||||
|
return tr("Darksend Denominate");
|
||||||
|
case TransactionRecord::DarksendCollateralPayment:
|
||||||
|
return tr("Darksend Collateral Payment");
|
||||||
|
case TransactionRecord::DarksendSplitUpLarge:
|
||||||
|
return tr("Darksend Split Up Large Inputs");
|
||||||
|
case TransactionRecord::Darksent:
|
||||||
|
return tr("Darksent");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
@ -374,6 +386,7 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
|
|||||||
{
|
{
|
||||||
case TransactionRecord::Generated:
|
case TransactionRecord::Generated:
|
||||||
return QIcon(":/icons/tx_mined");
|
return QIcon(":/icons/tx_mined");
|
||||||
|
case TransactionRecord::RecvWithDarksend:
|
||||||
case TransactionRecord::RecvWithAddress:
|
case TransactionRecord::RecvWithAddress:
|
||||||
case TransactionRecord::RecvFromOther:
|
case TransactionRecord::RecvFromOther:
|
||||||
return QIcon(":/icons/tx_input");
|
return QIcon(":/icons/tx_input");
|
||||||
@ -393,8 +406,10 @@ QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, b
|
|||||||
case TransactionRecord::RecvFromOther:
|
case TransactionRecord::RecvFromOther:
|
||||||
return QString::fromStdString(wtx->address);
|
return QString::fromStdString(wtx->address);
|
||||||
case TransactionRecord::RecvWithAddress:
|
case TransactionRecord::RecvWithAddress:
|
||||||
|
case TransactionRecord::RecvWithDarksend:
|
||||||
case TransactionRecord::SendToAddress:
|
case TransactionRecord::SendToAddress:
|
||||||
case TransactionRecord::Generated:
|
case TransactionRecord::Generated:
|
||||||
|
case TransactionRecord::Darksent:
|
||||||
return lookupAddress(wtx->address, tooltip);
|
return lookupAddress(wtx->address, tooltip);
|
||||||
case TransactionRecord::SendToOther:
|
case TransactionRecord::SendToOther:
|
||||||
return QString::fromStdString(wtx->address);
|
return QString::fromStdString(wtx->address);
|
||||||
|
@ -78,6 +78,8 @@ TransactionView::TransactionView(QWidget *parent) :
|
|||||||
TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther));
|
TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther));
|
||||||
typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
|
typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
|
||||||
TransactionFilterProxy::TYPE(TransactionRecord::SendToOther));
|
TransactionFilterProxy::TYPE(TransactionRecord::SendToOther));
|
||||||
|
typeWidget->addItem(tr("Darksent"), TransactionFilterProxy::TYPE(TransactionRecord::Darksent));
|
||||||
|
typeWidget->addItem(tr("Darksend Denominate"), TransactionFilterProxy::TYPE(TransactionRecord::DarksendDenominate));
|
||||||
typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
|
typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
|
||||||
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
|
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
|
||||||
typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
|
typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
|
||||||
|
Loading…
Reference in New Issue
Block a user