Bitcoin Forum
November 09, 2024, 08:35:25 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bounty: A zero-confirm modified bitcoind  (Read 999 times)
vintosalgos223 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
May 21, 2013, 02:10:01 PM
 #1

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.

Code:
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

Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
May 21, 2013, 02:35:32 PM
 #2

Satoshi-dice is based on BitcoinJ. One of the example projects is called PingService which listens for incoming transactions and then sends them back where they came which is pretty much the entire functionality of Satoshi-dice.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!