Change brace formatting

Suggested https://github.com/bitcoin/bitcoin/pull/15288#pullrequestreview-197915100
This commit is contained in:
Russell Yanofsky
2019-02-01 17:35:51 -05:00
parent a1df1b48a8
commit f7efd87c8f
3 changed files with 23 additions and 13 deletions

View File

@@ -157,8 +157,9 @@ UniValue importprivkey(const JSONRPCRequest& request)
if (!request.params[2].isNull())
fRescan = request.params[2].get_bool();
if (fRescan && pwallet->chain().getPruneMode())
if (fRescan && pwallet->chain().getPruneMode()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
}
if (fRescan && !reserver.reserve()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait.");
@@ -313,8 +314,9 @@ UniValue importaddress(const JSONRPCRequest& request)
if (!request.params[2].isNull())
fRescan = request.params[2].get_bool();
if (fRescan && pwallet->chain().getPruneMode())
if (fRescan && pwallet->chain().getPruneMode()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
}
WalletRescanReserver reserver(pwallet);
if (fRescan && !reserver.reserve()) {
@@ -501,8 +503,9 @@ UniValue importpubkey(const JSONRPCRequest& request)
if (!request.params[2].isNull())
fRescan = request.params[2].get_bool();
if (fRescan && pwallet->chain().getPruneMode())
if (fRescan && pwallet->chain().getPruneMode()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
}
WalletRescanReserver reserver(pwallet);
if (fRescan && !reserver.reserve()) {
@@ -562,8 +565,9 @@ UniValue importwallet(const JSONRPCRequest& request)
},
}.ToString());
if (pwallet->chain().getPruneMode())
if (pwallet->chain().getPruneMode()) {
throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode");
}
WalletRescanReserver reserver(pwallet);
if (!reserver.reserve()) {