Skip to content

Commit 88bf5b5

Browse files
committed
Saving state without out patch. Decimal Serializer Patch:
jgarzik/python-bitcoinrpc#39
1 parent 2290696 commit 88bf5b5

14 files changed

+22
-18
lines changed
0 Bytes
Binary file not shown.

stakenannyb/bitcoinrpc/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
2020
"""
21-
bitcoin-python3 - Easy-to-use Bitcoin API client
21+
bitcoin-python - Easy-to-use Bitcoin API client
2222
"""
2323

2424

@@ -41,7 +41,7 @@ def connect_to_local(filename=None, rpcuser=None, rpcpassword=None):
4141
port = int(cfg.get('rpcport', '18332' if cfg.get('testnet') else '8332'))
4242
if not rpcuser:
4343
rpcuser = cfg.get('rpcuser', '')
44-
if not rpcpassword:
44+
if not rpcpassword:
4545
rpcpassword = cfg.get('rpcpassword', '')
4646

4747
return BitcoinConnection(rpcuser, rpcpassword, 'localhost', port)
-1 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-56 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
36 Bytes
Binary file not shown.
-29 Bytes
Binary file not shown.

stakenannyb/bitcoinrpc/connection.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class BitcoinConnection(object):
3333
A BitcoinConnection object defines a connection to a bitcoin server.
3434
It is a thin wrapper around a JSON-RPC API connection.
3535
36-
Up-to-date for SVN revision 198.
37-
3836
Arguments to constructor:
3937
4038
- *user* -- Authenticate as user.
@@ -204,7 +202,7 @@ def sendtoaddress(self, bitcoinaddress, amount, comment=None, comment_to=None):
204202
Arguments:
205203
206204
- *bitcoinaddress* -- Bitcoin address to send to.
207-
- *amount* -- Amount to send (float, rounded to the nearest 0.01).
205+
- *amount* -- Amount to send (float, rounded to the nearest 0.00000001).
208206
- *minconf* -- Minimum number of confirmations required for transferred balance.
209207
- *comment* -- Comment for transaction.
210208
- *comment_to* -- Comment for to-address.
@@ -369,7 +367,7 @@ def listaccounts(self, minconf=1, as_dict=False):
369367
if as_dict:
370368
return dict(self.proxy.listaccounts(minconf))
371369
else:
372-
return list(self.proxy.listaccounts(minconf).keys())
370+
return self.proxy.listaccounts(minconf).keys()
373371

374372
def listreceivedbyaccount(self, minconf=1, includeempty=False):
375373
"""
@@ -400,7 +398,7 @@ def listtransactions(self, account=None, count=10, from_=0, address=None):
400398
- *from_* -- Skip the first <from_> transactions.
401399
- *address* -- Receive address to consider
402400
"""
403-
accounts = [account] if account is not None else iter(self.listaccounts(as_dict=True).keys())
401+
accounts = [account] if account is not None else self.listaccounts(as_dict=True).keys()
404402
return [TransactionInfo(**tx) for acc in accounts for
405403
tx in self.proxy.listtransactions(acc, count, from_) if
406404
address is None or tx["address"] == address]

0 commit comments

Comments
 (0)