So I decided to do a variation on the coin-toss theme... http://flipforbits.comIt's basically a snapshot of me trying to learn jquery. Thanks to the forum member who helped out with this one... I'll let your name be known if you wish.
|
|
|
I really enjoy Bitcoin Toss and would vouch for it to anyone, I've had great success.
Thanks, good to hear
|
|
|
Sent a tx at 18:32 for 20 bitcents, and won, my tx has 4 confirmations, and I haven't received my 40 bitcents. Sent a tx at 18:41 for 19 bitcents, and won, my tx has 0 confirmations, and the tx to me for 38 bitcents has 0 confirmations, but is listed.
What happened in the first bet?
Also, I suggest changing the form from a POST to a GET, so that if I accidentally close the tab, I can get back to it with the id saved in my history. (Lost some coins this way earlier.)
EDIT: The first one now has 6 transactions. Still none received.
This is the only bet of 20 bitcents in the entire database, which won... and the 40 bitcents went out: http://blockexplorer.com/tx/6e485d4fef305f7613936da6448f4363692fe0162710d7ad887430ab4ddc2a03#o1Can you tell me what address you sent the 20 bitcents to?
|
|
|
Thats basically a good idea, but I think it's possible to cheat: As far as I know, it's possible (with some effort) to undo the spendings with 0 confirmations (I forgot about the name of that attack and how it's done in detail). You delay the payout of winnings but people could still cheat you by undoing the payments for the games they lost.
I'd be interested to hear about that type of attack. I think even mybitcoin.com 'accepts' payments on 0/unconfirmed and sends postback data to merchants immediately.
|
|
|
I don't own that one by the way. The reason I decided it'd be worth copying the concept is that I don't like the way they make you wait a million years between paying and playing. I prefer the long wait to be on the other end of the game.
|
|
|
The payment is showing in my client as 0/offline? -240.00
It'll get to you eventually.
That's strange... Wonder if that is a problem on my end or yours. I do have an abnormally low number of connections at the moment (only 8, I usually have like 30+). Ah well, it'll make it through as you say. Never seen that message before though. Anyone more knowledgeable than I care to share what it means? EDIT: Never mind... Did some Googling and figured out what it was. I think it's an issue on your end doood, but it should resolve itself eventually. EDIT 2: Showing in my client as 0/unconfirmed... All should be well. Thanks again doood. bitcoin = best community ever. Yeah straight after my last post, I restarted my client and it was then listed as 0/unconfirmed... so I guess the 'offline' error was on my end.
|
|
|
Not seeing the 240 in my client yet
The payment is showing in my client as 0/offline? -240.00 It'll get to you eventually.
|
|
|
240 sent...
Deposit addresses are definitely for one-time use. You should be getting a new one each time you play.
I'll write a warning about that on the site...
|
|
|
Duh sorry... more encryption, slower cpu, larger wallet.dat.
Still, I didn't think it would be that much slower.
|
|
|
Hi,
On one of my wallets (my desktop) when I click "New address..." the address appears almost instantly after I type a label.
However on the laptop wallet, it takes over 30 seconds, maybe a minute for the GUI to respond every time I add a new address.
What would be the likely reasons for this?
Cheers.
|
|
|
Thanks for the kind words.
There will absolutely be no other refunds from this point.
sat0pi: send me a new address if you like.
|
|
|
Lost 10 times in a row. That's not very likely, so I'm not sure how fair this is.
Were you ID 2? That user looks like it's just hit refresh over and over again instead of starting each game from the start. Wait, does that somehow let you play with the same result over and over? No, it doesn't... refreshing is pointless... I can however see it in the logs. It's the only thing I can see that even remotely looks like 10 losses in a row.
|
|
|
Lost 10 times in a row. That's not very likely, so I'm not sure how fair this is.
Were you ID 2? That user looks like it's just hit refresh over and over again instead of starting each game from the start, which surely doesn't count as 10 losses in a row.
|
|
|
Lost 250 BTC lol
Ugh, that was dumb of me. Woah there, slow down! If noone else 'claims' such a loss, I'll send you back 240... GAMBLE RESPONSIBLY! For what it's worth, the site uses random.org to get a number between 1 and 100 inclusive: $ch = curl_init('http://www.random.org/integers/?num=1&min=1&max=100&col=1&base=10&format=plain&rnd=new'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ; $randnum = trim(curl_exec($ch));
if ($randnum>51) { add_to_log('Player WINS'); $result='bitcoin'; } else { add_to_log('Player LOSES'); $result='carrot'; }
Anyway thanks for playing... it was a royal pain getting it all to work.
|
|
|
My latest site... please check it out... http://bitcointoss.comOnce you make a payment, you can play almost immediately on 0/unconfirmed, then only if you win do you need to wait for the full confirmation before receiving your payout. Refer and get 1% of your referral's bets. p.s. I had this site in mind when I did up the 'carrot coin' a couple of days ago... it's the 'losing' side of a bitcoin.
|
|
|
Wow, problem solved after only 4 hours. $bitcoin->sendfrom('My Site','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',0.04); //works with literals $bitcoin->sendfrom(SITE_NAME,'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',0.04); //works with constant and 2 literals $bitcoin->sendfrom(SITE_NAME,$ref_details['pay_out_address'],0.04); //works with constant, var and 1 literal $bitcoin->sendfrom(SITE_NAME,$ref_details['pay_out_address'],$sendamt); //COMPLETELY FUBAR TOOK 4 HOURS OF MY LIFE AWAY SON OF A BITCH I HATE PROGRAMMING $bitcoin->sendfrom(SITE_NAME,$ref_details['pay_out_address'],(float)$sendamt); //works with constant and 2 vars if 3rd is type cast
I really do love programming though, honestly. Tags: PHP, JSON, RPC, Unable to connect, float, string, amount, type cast, error, fubar
|
|
|
Well, I just tested that... exactly the same server, same daemon, same wallet, different domain name and it was able to send 100% fine. define('INC','../inc/'); require_once(INC.'jsonRPCClient.php'); $bitcoin = new jsonRPCClient('http://xxxxxxxxxxxx:yyyyyyyyyyyyy@127.0.0.1:8332/');
$bitcoin->sendfrom('My Site','xxxxxxxxxxxxxxxxxxxxxxx',1);
echo "<pre>\n"; print_r($bitcoin->getinfo());
$listaccounts=$bitcoin->listaccounts(); print_r($listaccounts);
(Username and password are exactly the same in both scripts). I'll try putting this stupido script onto this other domain...
|
|
|
Array ( [isvalid] => 1 [address] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [ismine] => )
exception 'Exception' with message 'Unable to connect to http://xxxxxxxxxxxxx:yyyyyyyyyyyyy@127.0.0.1:8332/' in /web/sites/me/_shared/jsonRPCClient.php:140 Stack trace: #0 [internal function]: jsonRPCClient->__call('sendfrom', Array) #1 /web/sites/me/mydomain.com/public_html/_run_test9.php(109): jsonRPCClient->sendfrom('My Site', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', '0.46') #2 {main}
Server error! Please contact the admin.
NFI. I might need to order a new monitor soon coz I'm about to punch this one after 3 hours.
|
|
|
The weird thing is I can easily do $bitcoin->validateaddress('biwoejfiwjefiwojeifow'); with no problem; it connects to the wallet and returns valid info. Array ( [isvalid] => 1 [address] => biwoejfiwjefiwojeifow [ismine] => )
However just a couple of lines after that when I try to do the send it says it can't connect. try { $pay_out_address_details=$bitcoin->validateaddress($new_user['pay_out_address']); echo '<pre>'; print_r($pay_out_address_details); echo '</pre>'; } catch (Exception $e) { echo $e.'<br>'; die("<p>Server error! Please contact the admin.</p>"); }
It gets past that bit, but immediately after it is this, which it breaks on: if ($pay_out_address_details['isvalid']==1) { //add_to_log('Valid address... sending '.$new_user['pay_out_amount'].' BTC...'); $sendamt=number_format($new_user['pay_out_amount'],2,'.',''); if ($sendamt<=1000) { try { $bitcoin->sendfrom(PROGRAM_NAME,$new_user['pay_out_address'],$sendamt); } catch (Exception $e) { echo $e.'<br>'; die("<p>Server error! Please contact the admin.</p>"); } //add_to_log('...sent successfully.'); } }
Note the add_to_log statements have been commented out.
|
|
|
|