Bitcoin Forum
July 29, 2024, 08:20:50 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Beginners & Help / Re: PHP RPC move float problem on: July 24, 2013, 05:17:38 PM
I guess you just don't have so much BTC in your wallet :-)

Without code and without error message nobody can help you.

Well, I supposed it's obvious what kind of error it is Tongue
Moving 17999999.99999999 BTC (18 * 10^6 - 1 satoshi) moves 18000000 and that's my error. Of course I know it is float fault, but I want to find some nice option to avoid that.

Now I see few possibilities:
1) Modify bitcoind to use string instead float or satoshi, but it is uncomfortable
2) There is a problem with rpc library, so I should modify library, use curl, etc.

I would like universal solution in terms of protocol, so moving this amount should be correct Smiley.
Cheers

2  Other / Beginners & Help / PHP RPC move float problem on: July 24, 2013, 04:22:50 PM
Hello,
nice to meet you all.
I cannot cope with such problem:
I want to move BTC with move RPC command in PHP using jsonrpcphp recommended in bitcoin wiki.
The syntax is move(string fromAccount, string toAccount, float amount).

And obviously, amounts like 19999999.99999999 cause error.
What would be the best option in order to avoid it?



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!