aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-10-25 08:04:23 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-02-27 20:45:18 +0000
commitbf8a04a165e1c19dffce70a7e5c3fb10b0035d96 (patch)
tree05a869abf04d768c9f31c6bbe98345613166ab28 /src/rpc
parent2e518e313b5d5320c16bdb33ebd008b6d30a90f2 (diff)
downloadbitcoin-bf8a04a165e1c19dffce70a7e5c3fb10b0035d96.tar.xz
Reformat touched lines with C++11
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/misc.cpp12
-rw-r--r--src/rpc/rawtransaction.cpp3
2 files changed, 9 insertions, 6 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index 746189a2ae..fe46f61d81 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -101,8 +101,9 @@ UniValue getinfo(const JSONRPCRequest& request)
obj.push_back(Pair("keypoololdest", pwallet->GetOldestKeyPoolTime()));
obj.push_back(Pair("keypoolsize", (int)pwallet->GetKeyPoolSize()));
}
- if (pwallet && pwallet->IsCrypted())
+ if (pwallet && pwallet->IsCrypted()) {
obj.push_back(Pair("unlocked_until", pwallet->nRelockTime));
+ }
obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK())));
#endif
obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK())));
@@ -210,8 +211,9 @@ UniValue validateaddress(const JSONRPCRequest& request)
ret.push_back(Pair("iswatchonly", (mine & ISMINE_WATCH_ONLY) ? true: false));
UniValue detail = boost::apply_visitor(DescribeAddressVisitor(pwallet), dest);
ret.pushKVs(detail);
- if (pwallet && pwallet->mapAddressBook.count(dest))
+ if (pwallet && pwallet->mapAddressBook.count(dest)) {
ret.push_back(Pair("account", pwallet->mapAddressBook[dest].name));
+ }
CKeyID keyID;
if (pwallet) {
const auto& meta = pwallet->mapKeyMetadata;
@@ -257,16 +259,16 @@ CScript _createmultisig_redeemScript(CWallet * const pwallet, const UniValue& pa
#ifdef ENABLE_WALLET
// Case 1: Bitcoin address and we have full public key:
CBitcoinAddress address(ks);
- if (pwallet && address.IsValid())
- {
+ if (pwallet && address.IsValid()) {
CKeyID keyID;
if (!address.GetKeyID(keyID))
throw runtime_error(
strprintf("%s does not refer to a key",ks));
CPubKey vchPubKey;
- if (!pwallet->GetPubKey(keyID, vchPubKey))
+ if (!pwallet->GetPubKey(keyID, vchPubKey)) {
throw runtime_error(
strprintf("no full public key for address %s",ks));
+ }
if (!vchPubKey.IsFullyValid())
throw runtime_error(" Invalid public key: "+ks);
pubkeys[i] = vchPubKey;
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 5c75fecac8..ce7afcbe54 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -721,8 +721,9 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
}
}
#ifdef ENABLE_WALLET
- else if (pwallet)
+ else if (pwallet) {
EnsureWalletIsUnlocked(pwallet);
+ }
#endif
// Add previous txouts given in the RPC call: