Page MenuHomePhabricator

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

Authored by PiRK on Feb 17 2021, 14:35.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable