mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
various updates
This commit is contained in:
parent
7352fe6630
commit
925148076a
@ -9,7 +9,7 @@
|
||||
#define CLIENT_VERSION_MAJOR 0
|
||||
#define CLIENT_VERSION_MINOR 10
|
||||
#define CLIENT_VERSION_REVISION 12
|
||||
#define CLIENT_VERSION_BUILD 10
|
||||
#define CLIENT_VERSION_BUILD 11
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
#define CLIENT_VERSION_IS_RELEASE true
|
||||
|
24
src/main.cpp
24
src/main.cpp
@ -2673,7 +2673,7 @@ bool CBlock::AcceptBlock(CValidationState &state, CDiskBlockPos *dbp)
|
||||
double n1 = ConvertBitsToDouble(nBits);
|
||||
double n2 = ConvertBitsToDouble(nBitsNext);
|
||||
|
||||
if (abs(n1-n2) > n1*0.2)
|
||||
if (abs(n1-n2) > n1*0.5)
|
||||
return state.DoS(100, error("AcceptBlock() : incorrect proof of work (DGW pre-fork) - %f", abs(n1-n2)));
|
||||
} else {
|
||||
if (nBits != GetNextWorkRequired(pindexPrev, this))
|
||||
@ -5940,6 +5940,8 @@ struct CompareValueOnly
|
||||
}
|
||||
};
|
||||
|
||||
int randomizeList (int i) { return std::rand()%i;}
|
||||
|
||||
void CDarkSendPool::SetNull(){
|
||||
//printf("CDarkSendPool::SetNull()\n");
|
||||
|
||||
@ -6022,18 +6024,9 @@ void CDarkSendPool::Check()
|
||||
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
{
|
||||
for(unsigned int i = 0; i < entries.size(); i++){
|
||||
BOOST_FOREACH(const CTxOut v, entries[i].vout)
|
||||
txNew.vout.push_back(v);
|
||||
|
||||
BOOST_FOREACH(const CDarkSendEntryVin s, entries[i].sev){
|
||||
txNew.vin.push_back(s.vin);
|
||||
}
|
||||
}
|
||||
|
||||
if (fMasterNode) { //only the main node is master atm
|
||||
int i = 0;
|
||||
BOOST_FOREACH(const CTxIn& txin, txNew.vin)
|
||||
BOOST_FOREACH(const CTxIn& txin, finalTransaction.vin)
|
||||
{
|
||||
BOOST_FOREACH(const CDarkSendEntry e, myEntries)
|
||||
{
|
||||
@ -6123,13 +6116,13 @@ void CDarkSendPool::CheckTimeout(){
|
||||
// catching hanging sessions
|
||||
if(!fMasterNode) {
|
||||
if(state == POOL_STATUS_TRANSMISSION) {
|
||||
if(fDebug) printf("CDarkSendPool::Check() -- SESSION COMPLETED -- CHECKING\n");
|
||||
if(fDebug) printf("CDarkSendPool::CheckTimeout() -- SESSION COMPLETED -- CHECKING\n");
|
||||
Check();
|
||||
}
|
||||
}
|
||||
|
||||
if(state == POOL_STATUS_SIGNING && GetTimeMillis()-lastTimeChanged >= 10000 ) {
|
||||
if(fDebug) printf("CDarkSendPool::Check() -- SESSION TIMED OUT -- RESETTING\n");
|
||||
if(fDebug) printf("CDarkSendPool::CheckTimeout() -- SESSION TIMED OUT -- RESETTING\n");
|
||||
ChargeFees();
|
||||
SetNull();
|
||||
//add my transactions to the new session
|
||||
@ -6276,6 +6269,11 @@ bool CDarkSendPool::AddScriptSig(const CTxIn& newVin){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(CTxIn in, finalTransaction.vin){
|
||||
if(in == newVin){
|
||||
in.sigScript = newVin.sigScript;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("CDarkSendPool::AddScriptSig -- Couldn't set sig!\n" );
|
||||
|
@ -36,7 +36,7 @@ class CBitcoinAddress;
|
||||
#define START_MASTERNODE_PAYMENTS_TESTNET 1403568776 //Tue, 24 Jun 2014 00:12:56 GMT
|
||||
#define START_MASTERNODE_PAYMENTS 1403728576 //Wed, 25 Jun 2014 20:36:16 GMT
|
||||
|
||||
#define POOL_MAX_TRANSACTIONS 2 // wait for X transactions to merge and publish
|
||||
#define POOL_MAX_TRANSACTIONS 3 // wait for X transactions to merge and publish
|
||||
#define POOL_STATUS_UNKNOWN 0 // waiting for update
|
||||
#define POOL_STATUS_IDLE 1 // waiting for update
|
||||
#define POOL_STATUS_ACCEPTING_ENTRIES 2 // accepting entries
|
||||
|
Loading…
Reference in New Issue
Block a user