jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
644 stars 304 forks source link

Support Decimal serialization #30

Closed gavinandresen closed 10 years ago

gavinandresen commented 10 years ago

AuthProxy would return Decimal objects, which is great. But could not JSON-encode Decimal objects, so things like this didn't work:

balance = connection.getbalance()
connection.sendtoaddress(foo, balance/2)

The fix is a little EncodeDecimal helper function.

Tested in some Bitcoin smartfee regression tests I'm writing.

Built on top of #29.

jgarzik commented 10 years ago

ACK, but says there are merge conflicts, after I merged #29 (rebase?)

gavinandresen commented 10 years ago

Rebased.