mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge branch 'master' of https://github.com/darkcoin/darkcoin
This commit is contained in:
commit
5a7582c88f
@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 11)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 9)
|
||||
define(_CLIENT_VERSION_BUILD, 10)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2015)
|
||||
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 11
|
||||
#define CLIENT_VERSION_REVISION 0
|
||||
#define CLIENT_VERSION_BUILD 9
|
||||
#define CLIENT_VERSION_BUILD 10
|
||||
|
||||
|
||||
|
||||
|
@ -793,6 +793,8 @@ void CDarkSendPool::ChargeRandomFees(){
|
||||
// Check for various timeouts (queue objects, darksend, etc)
|
||||
//
|
||||
void CDarkSendPool::CheckTimeout(){
|
||||
if(!fEnableDarksend) return;
|
||||
|
||||
// catching hanging sessions
|
||||
if(!fMasterNode) {
|
||||
if(state == POOL_STATUS_TRANSMISSION) {
|
||||
@ -1359,7 +1361,6 @@ void CDarkSendPool::NewBlock()
|
||||
{
|
||||
if(fDebug) LogPrintf("CDarkSendPool::NewBlock \n");
|
||||
|
||||
if(IsInitialBlockDownload()) return;
|
||||
|
||||
masternodePayments.ProcessBlock(chainActive.Tip()->nHeight+10);
|
||||
|
||||
|
@ -1170,6 +1170,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
return InitError("You can not start a masternode in litemode");
|
||||
}
|
||||
|
||||
LogPrintf("fLiteMode %d\n", fLiteMode);
|
||||
LogPrintf("nInstantXDepth %d\n", nInstantXDepth);
|
||||
LogPrintf("Darksend rounds %d\n", nDarksendRounds);
|
||||
LogPrintf("Anonymize Darkcoin Amount %d\n", nAnonymizeDarkcoinAmount);
|
||||
|
@ -3210,9 +3210,11 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
|
||||
mapOrphanBlocksByPrev.erase(hashPrev);
|
||||
}
|
||||
|
||||
if(!IsInitialBlockDownload()){
|
||||
darkSendPool.CheckTimeout();
|
||||
darkSendPool.NewBlock();
|
||||
if(!fLiteMode){
|
||||
if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
|
||||
darkSendPool.CheckTimeout();
|
||||
darkSendPool.NewBlock();
|
||||
}
|
||||
}
|
||||
|
||||
LogPrintf("ProcessBlock: ACCEPTED\n");
|
||||
|
@ -764,7 +764,7 @@ int CMasternodePayments::LastPayment(CMasterNode& mn)
|
||||
|
||||
bool CMasternodePayments::ProcessBlock(int nBlockHeight)
|
||||
{
|
||||
if(strMasterPrivKey.empty()) return false;
|
||||
if(!enabled) return false;
|
||||
CMasternodePaymentWinner winner;
|
||||
|
||||
uint256 blockHash = 0;
|
||||
@ -839,6 +839,7 @@ bool CMasternodePayments::SetPrivKey(std::string strPrivKey)
|
||||
|
||||
if(CheckSignature(winner)){
|
||||
LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as masternode payments master\n");
|
||||
enabled = true;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -195,12 +195,14 @@ private:
|
||||
std::string strMasterPrivKey;
|
||||
std::string strTestPubKey;
|
||||
std::string strMainPubKey;
|
||||
bool enabled;
|
||||
|
||||
public:
|
||||
|
||||
CMasternodePayments() {
|
||||
strMainPubKey = "04549ac134f694c0243f503e8c8a9a986f5de6610049c40b07816809b0d1d06a21b07be27b9bb555931773f62ba6cf35a25fd52f694d4e1106ccd237a7bb899fdd";
|
||||
strTestPubKey = "046f78dcf911fbd61910136f7f0f8d90578f68d0b3ac973b5040fb7afb501b5939f39b108b0569dca71488f5bbf498d92e4d1194f6f941307ffd95f75e76869f0e";
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
bool SetPrivKey(std::string strPrivKey);
|
||||
|
@ -1558,6 +1558,9 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t
|
||||
if(nValueRet >= nValueMin){
|
||||
//random reduce the max amount we'll submit for anonymity
|
||||
nValueMax -= (rand() % (nValueMax/5));
|
||||
//on average use 50% of the inputs or less
|
||||
int r = (rand() % (int)vCoins.size());
|
||||
if((int)setCoinsRet.size() > r) return true;
|
||||
}
|
||||
//Denomination criterion has been met, we can take any matching denominations
|
||||
if((nDenom & (1 << 0)) && out.tx->vout[out.i].nValue == ((100*COIN)+1)) {fAccepted = true;}
|
||||
|
Loading…
Reference in New Issue
Block a user