|
|
@ -1154,7 +1154,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
|
|
|
|
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
|
|
|
|
BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int64 nCredit = pcoin.first->vout[pcoin.second].nValue;
|
|
|
|
int64 nCredit = pcoin.first->vout[pcoin.second].nValue;
|
|
|
|
dPriority += (double)nCredit * pcoin.first->GetDepthInMainChain();
|
|
|
|
//The priority after the next block (depth+1) is used instead of the current,
|
|
|
|
|
|
|
|
//reflecting an assumption the user would accept a bit more delay for
|
|
|
|
|
|
|
|
//a chance at a free transaction.
|
|
|
|
|
|
|
|
dPriority += (double)nCredit * (pcoin.first->GetDepthInMainChain()+1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int64 nChange = nValueIn - nValue - nFeeRet;
|
|
|
|
int64 nChange = nValueIn - nValue - nFeeRet;
|
|
|
|