Page MenuHomePhabricator

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

Authored by majcosta on Sat, Aug 1, 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

majcosta created this revision.Sat, Aug 1, 14:54
Herald added a reviewer: Restricted Project. · View Herald TranscriptSat, Aug 1, 14:54
majcosta requested review of this revision.Sat, Aug 1, 14:54
Fabien accepted this revision.Mon, Aug 3, 09:14
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.Mon, Aug 3, 09:14