I'm trying to figure out how the Satoshi dice 0-confirm transactions are conducted. I have drilled down to the following code and made comments based on my understanding. Let me know if I am correct in these comments. Also where should I start looking to chain the incoming transaction to the outgoing transaction? I am willing to pay for someone to whip up a bit of code as the rest of the project is complete except for this part.
bool CWallet::SelectCoins(int64 nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const
{
vector<COutput> vCoins;
AvailableCoins(vCoins);
//SelectCoinsMinConf
//int64 nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet)
//First number is if local transaction required "1", "6" is receive by foreign.
return (SelectCoinsMinConf(nTargetValue, 1, 6, vCoins, setCoinsRet, nValueRet) || //Changing 6 to 0 may make it allow 0 confirmed coins be able to be sent
SelectCoinsMinConf(nTargetValue, 1, 1, vCoins, setCoinsRet, nValueRet) ||
SelectCoinsMinConf(nTargetValue, 0, 1, vCoins, setCoinsRet, nValueRet));
}
Thanks guys