HomePhabricator

cli: extract connection exception handler, -rpcwait logic to ConnectAndCallRPC()

Description

cli: extract connection exception handler, -rpcwait logic to ConnectAndCallRPC()

Summary:

This is needed for RPCs that need to be called and handled sequentially, rather
than alone or in a batch.

For example, when fetching the balances for each loaded wallet, -getinfo will
call RPC listwallets, and then, depending on the result, RPC getbalances.

This is a backport of Core PR18594 [1/6]
https://github.com/bitcoin/bitcoin/pull/18594/commits/29f2cbdeb7afdde87d108adf80cffad17d112632

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Jon Atack <jon@atack.com>Authored on Apr 12 2020, 19:01
PiRKCommitted on Feb 18 2021, 12:58
PiRKPushed on Feb 18 2021, 12:58
Reviewer
Restricted Project
Differential Revision
D9237: cli: extract connection exception handler, -rpcwait logic to ConnectAndCallRPC()
Parents
rABCa0f63989f10e: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown