diff options
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/misc.cpp | 12 | ||||
-rw-r--r-- | src/rpc/rawtransaction.cpp | 3 |
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: |