Page MenuHomePhabricator

[backport#17070] wallet: Avoid showing GUI popups on RPC errors
ClosedPublic

Authored by majcosta on Aug 1 2020, 14:54.

Details

Summary

wallet: Avoid showing GUI popups on RPC errors (MarcoFalke)

Pull request description:

RPC errors and warnings are shown as popups in the GUI instead of being returned to the RPC caller. For example,

```
$ ./src/bitcoin-cli loadwallet $(pwd)/./test/functional/data/wallets/high_minversion/
error code: -4
error message:
Wallet loading failed.
```

gives me a GUI popup and no reason why loading the wallet failed.

After this pull request:

```
$ ./src/bitcoin-cli loadwallet $(pwd)/./test/functional/data/wallets/high_minversion/
error code: -4
error message:
Wallet loading failed: Error loading /home/marco/workspace/btc_bitcoin_core/./test/functional/data/wallets/high_minversion/wallet.dat: Wallet requires newer version of Bitcoin Core

https://github.com/bitcoin/bitcoin/pull/17070/commits/facec1c643105d0ae74b5d32cf33d593f9e82a36


Depends on D7106

Backport of Core PR17070

Test Plan
ninja check check-functional

Diff Detail

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

Event Timeline

majcosta requested review of this revision.Aug 1 2020, 14:54
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/rpcwallet.cpp
3177 ↗(On Diff #22692)

Previous comment seems more accurate, and this change is not from the PR

src/wallet/wallet.cpp
4757 ↗(On Diff #22692)

Layout

This revision is now accepted and ready to land.Aug 3 2020, 09:14