mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Reformat touched lines with C++11
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user