Bitcoin Forum
August 23, 2024, 03:35:45 AM *
News: All versions of Windows are affected by a critical security bug; make sure you update.
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Bounty: A zero-confirm modified bitcoind on: May 23, 2013, 01:45:25 AM
I am looking for someone that can modify bitcoind for me to process 0-confirm bets for a casino site. As far as I understand there will be 3 changes,

1. An RPC call that will take a specific TX and pay back coins to the original sender using sender's coins combined with additional funds (from a separate source) if amount to return is larger than initial bet.
2. Allow bitcoind to send funds that are zero confirmed.
3. Additional security measures that you can think of.

Please PM me with a quote of what type of coin this project will take to get done. I'm eager to move swiftly on this as the site and PHP front-end is complete.
2  Bitcoin / Development & Technical Discussion / Re: Simple Dump Bitcoins Script (JSON-RPC) on: May 21, 2013, 04:46:13 PM
I simplified it a bit for my needs,

Code:

$bitcoin = new jsonRPCClient('http://bitsuer:bitpw@localhost:1234/');

$to = "toaddresshere";

$amount = floatval($bitcoin->getbalance());

echo("Sending ".$amount." to ".$to."<br>");
echo($bitcoin->sendtoaddress($to, $amount));


I suspect it may have to do with getbalance returning unconfirmed transactions as part of my balance.
3  Bitcoin / Development & Technical Discussion / Simple Dump Bitcoins Script (JSON-RPC) on: May 21, 2013, 04:13:43 PM
I'm writing a PHP script to dump Bitcoins from my website's wallet to my other wallet, I put this in a cron job that runs every few minutes to keep my coins pretty safe. The script works if I don't try to send anywhere near the full balance however if I send slightly less it fails and I believe it's due to the fact of TX fees. Below is my current code. I'd like some suggestions as to how to calculate the TX fee if this is causing the problem and how to account for it.

Code:
<?
require_once 'jsonRPCClient2.php';
error_reporting(-1);

$bitcoin = new jsonRPCClient('http://coinusr:coinpw:1234/');

$to = "otherwalletaddresshere";

$amount = 0.00;

foreach($bitcoin->listreceivedbyaccount() as $key=>$value){

if($bitcoin->getbalance((string)$value['account']) > "0")
{
$amount = $amount + $value['amount'];
echo($value['account']." has ".$value['amount']."<BR>");
}

}



echo("Sending ".$amount." to ".$to."<br>");
echo($bitcoin->sendtoaddress($to, $amount));


?>

4  Bitcoin / Development & Technical Discussion / Bounty: A zero-confirm modified bitcoind on: May 21, 2013, 02:10:01 PM
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

5  Other / Beginners & Help / Re: Stay safe. on: May 20, 2013, 09:31:28 PM
Great information, thanks for posting.
6  Other / Beginners & Help / Re: EARN BTC CHATTING, COME LEARN ABOUT BTC on: May 20, 2013, 09:30:21 PM
Nice chatroom.
7  Other / Beginners & Help / Re: Newbie Lock on: May 20, 2013, 09:26:49 PM
It may be 10 posts I'm thinking.
8  Other / Beginners & Help / Re: Waste of Time? on: May 20, 2013, 09:26:24 PM
It all comes down to if your paying for the electricity or not. Tongue
9  Other / Beginners & Help / Re: CGMiner Confusing/Mixing up my GPUs on: May 20, 2013, 09:25:45 PM
Make sure your config file isn't conflicting.
10  Other / Beginners & Help / Re: 3 minutes until leveling up on: May 20, 2013, 09:25:08 PM
Congrats!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!