various updates

This commit is contained in:
Evan Duffield 2014-08-01 15:43:14 -07:00
parent 7352fe6630
commit 925148076a
3 changed files with 13 additions and 15 deletions

View File

@ -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

View File

@ -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" );

View File

@ -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