Talk:Contract: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


How would you use contracts to place bets in a poker game? Specifically, could you form a separate contract for each person who calls a bet and automatically allocate funds to the winner?
How would you use contracts to place bets in a poker game? Specifically, could you form a separate contract for each person who calls a bet and automatically allocate funds to the winner?
''In theory section:''
When SIGHASH_ALL performed, pubkey exists in scriptSig too?
    script.cpp +1046:
   
    // Blank out other inputs' signatures
    for (int i = 0; i < txTmp.vin.size(); i++)
        txTmp.vin[i].scriptSig = CScript();
    txTmp.vin[nIn].scriptSig = scriptCode;

Revision as of 23:26, 7 February 2012

Example 3: Securing Bets

How would you use contracts to place bets in a poker game? Specifically, could you form a separate contract for each person who calls a bet and automatically allocate funds to the winner?


In theory section:

When SIGHASH_ALL performed, pubkey exists in scriptSig too?

   script.cpp +1046:
   
   // Blank out other inputs' signatures
   for (int i = 0; i < txTmp.vin.size(); i++)
       txTmp.vin[i].scriptSig = CScript();
   txTmp.vin[nIn].scriptSig = scriptCode;