Skip to content

Commit a581c95

Browse files
committed
Merge #139: Add include_watchonly to getbalance
773ba9a Add include_watchonly to getbalance (Gregory Sanders)
2 parents 19ea895 + 773ba9a commit a581c95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bitcoin/rpc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,19 @@ def getaccountaddress(self, account=None):
350350
r = self._call('getaccountaddress', account)
351351
return CBitcoinAddress(r)
352352

353-
def getbalance(self, account='*', minconf=1):
353+
def getbalance(self, account='*', minconf=1, include_watchonly=False):
354354
"""Get the balance
355355
356356
account - The selected account. Defaults to "*" for entire wallet. It
357357
may be the default account using "".
358358
359359
minconf - Only include transactions confirmed at least this many times.
360360
(default=1)
361+
362+
include_watchonly - Also include balance in watch-only addresses (see 'importaddress')
363+
(default=False)
361364
"""
362-
r = self._call('getbalance', account, minconf)
365+
r = self._call('getbalance', account, minconf, include_watchonly)
363366
return int(r*COIN)
364367

365368
def getbestblockhash(self):

0 commit comments

Comments
 (0)