HomePhabricator

Merge #13566: Fix get balance

Description

Merge #13566: Fix get balance

Summary:
702ae1e21a [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts. (John Newbery)
cf15761f6d [wallet] GetBalance can take a min_depth argument. (John Newbery)
0f3d6e9ab7 [wallet] factor out GetAvailableWatchOnlyBalance() (John Newbery)
7110c830f8 [wallet] deduplicate GetAvailableCredit logic (John Newbery)
ef7bc8893c [wallet] Factor out GetWatchOnlyBalance() (John Newbery)
4279da4785 [wallet] GetBalance can take an isminefilter filter. (John Newbery)

Pull request description:

#12953 inadvertently removed the functionality to call `getbalance "*" <int> <bool>` to get the wallet's balance with either minconfs or include_watchonly.

This restores that functionality (when `-deprecatedrpc=accounts`), and also makes it possible to call ``getbalance minconf=<int> include_watchonly=<bool>` when accounts are not being used.

Tree-SHA512: 67e84de9291ed6d34b23c626f4dc5988ba0ae6c99708d02b87dd3aaad3f4b6baa6202a66cc2dadd30dd993a39de8036ee920fcaa8cbb1c5dfe606e6fac183344

Backport of Core PR13566
https://github.com/bitcoin/bitcoin/pull/13566/files

Test Plan:

ninja check
test_runner.py wallet_basic

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4639

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Jul 14 2018, 02:40
jasonbcoxCommitted on Dec 5 2019, 16:17
jasonbcoxPushed on Dec 5 2019, 16:42
Reviewer
Restricted Project
Differential Revision
D4639: Merge #13566: Fix get balance
Parents
rSTAGING2da49591e709: Remove check-source-control-tools from check and check-all targets
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/14650