use more common syntax to make it clear that actually 6 confirmations are required for IX to work / +comments

This commit is contained in:
UdjinM6 2015-02-04 11:51:38 +03:00
parent 6bd911bfca
commit 877405c8fb
2 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,8 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
int nTxAge = 0;
BOOST_REVERSE_FOREACH(CTxIn i, tx.vin){
nTxAge = GetInputAge(i);
if(nTxAge <= 5){
if(nTxAge < 6)
{
LogPrintf("ProcessMessageInstantX::txlreq - Transaction not found / too new: %d / %s\n", nTxAge, tx.GetHash().ToString().c_str());
return;
}

View File

@ -1252,8 +1252,8 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
continue;
int nDepth = pcoin->GetDepthInMainChain(false);
// do not use IX coins until we have at least 1 blockchain confirmation
if (useIX && nDepth <= 5)
// do not use IX for inputs that have less then 6 blockchain confirmations
if (useIX && nDepth < 6)
continue;
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {