From 877405c8fbf0fd781aaff1307396b2c935c1ad8b Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 4 Feb 2015 11:51:38 +0300 Subject: [PATCH] use more common syntax to make it clear that actually 6 confirmations are required for IX to work / +comments --- src/instantx.cpp | 3 ++- src/wallet.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/instantx.cpp b/src/instantx.cpp index 3c306bf5e..9f2bf6f65 100644 --- a/src/instantx.cpp +++ b/src/instantx.cpp @@ -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; } diff --git a/src/wallet.cpp b/src/wallet.cpp index 535862c57..06b1fda47 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1252,8 +1252,8 @@ void CWallet::AvailableCoins(vector& 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++) {