collateral fixes

This commit is contained in:
Evan Duffield 2014-07-31 12:43:40 -07:00
parent 505b663b23
commit 0aa17be9b8
2 changed files with 12 additions and 3 deletions

View File

@ -5958,7 +5958,7 @@ void CDarkSendPool::SetNull(){
To fix this we need to queue an entry, request acceptance from masternode, then add upon success
*/
//myEntries.clear();
myEntries.clear();
state = POOL_STATUS_ACCEPTING_ENTRIES;
@ -6095,7 +6095,7 @@ void CDarkSendPool::Check()
pwalletMain->Lock();
}
if((state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) && GetTimeMillis()-lastTimeChanged >= 10000) {
if((state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS || state == POOL_STATUS_FINALIZE_TRANSACTION) && GetTimeMillis()-lastTimeChanged >= 10000) {
printf("CDarkSendPool::Check() -- RESETTING MESSAGE \n");
SetNull();
UnlockCoins();
@ -6325,7 +6325,10 @@ void CDarkSendPool::SendMoney(const CTransaction& collateral, std::vector<CTxIn>
printf("CDarkSendPool::SendMoney() -- NEW INPUT -- adding %s\n", vin[0].ToString().c_str());
}
if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) ClearLastMessage();
if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) {
//SetNull();
ClearLastMessage();
}
printf("CDarkSendPool::SendMoney() - Is connected to masternode?.\n");

View File

@ -1649,6 +1649,12 @@ string CWallet::DarkSendDenominate()
return _("Error: Wallet locked, unable to create transaction!");
}
if(darkSendPool.GetState() != POOL_STATUS_ERROR && darkSendPool.GetState() != POOL_STATUS_SUCCESS){
if(darkSendPool.GetMyTransactionCount() > 0){
return _("Error: You already have pending entries in the Darksend pool");
}
}
CTransaction txCollateral;
int64 nFeeRet = 0.001*COIN; ///need to get a better fee calc