Skip to content

Commit b77d4a1

Browse files
committed
Cleanup getreceivedbyaddress to match style of other RPC calls
1 parent 6483d17 commit b77d4a1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

bitcoin/rpc.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,19 @@ def getrawtransaction(self, txid, verbose=False):
323323
return r
324324

325325
def getreceivedbyaddress(self, addr, minconf=1):
326-
"""Get the amount (in satoshi) received by <address> in transactions
327-
with at least [minconf] confirmations. It correctly handles the case
328-
where someone has sent to the address in multiple transactions.
326+
"""Return total amount received by given a (wallet) address
329327
330-
Works only for addresses in the local wallet, external addresses will
331-
always show 0.
328+
Get the amount received by <address> in transactions with at least
329+
[minconf] confirmations.
332330
333-
addr - The selected address.
331+
Works only for addresses in the local wallet; other addresses will
332+
always show zero.
333+
334+
addr - The address. (CBitcoinAddress instance)
334335
minconf - Only include transactions confirmed at least this many times. (default=1)
335336
"""
336-
addr = str(addr)
337-
r = self._call('getreceivedbyaddress', addr, minconf)
338-
return int(r*COIN)
337+
r = self._call('getreceivedbyaddress', str(addr), minconf)
338+
return int(r * COIN)
339339

340340
def gettransaction(self, txid):
341341
"""Get detailed information about in-wallet transaction txid

0 commit comments

Comments
 (0)