diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -37,7 +37,9 @@ iss.imbue(loc); boost::posix_time::ptime ptime(boost::date_time::not_a_date_time); iss >> ptime; - if (ptime.is_not_a_date_time()) return 0; + if (ptime.is_not_a_date_time()) { + return 0; + } return (ptime - epoch).total_seconds(); } @@ -867,7 +869,7 @@ return NullUniValue; } - if (request.fHelp || request.params.size() != 1) + if (request.fHelp || request.params.size() != 1) { throw std::runtime_error( "dumpwallet \"filename\"\n" "\nDumps all wallet keys in a human-readable format to a " @@ -890,6 +892,7 @@ "\nExamples:\n" + HelpExampleCli("dumpwallet", "\"test\"") + HelpExampleRpc("dumpwallet", "\"test\"")); + } auto locked_chain = pwallet->chain().lock(); LOCK(pwallet->cs_wallet); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4979,7 +4979,7 @@ return NullUniValue; } - if (request.fHelp || request.params.size() != 1) + if (request.fHelp || request.params.size() != 1) { throw std::runtime_error( "getaddressesbylabel \"label\"\n" "\nReturns the list of addresses assigned the specified label.\n" @@ -4996,6 +4996,7 @@ "\nExamples:\n" + HelpExampleCli("getaddressesbylabel", "\"tabby\"") + HelpExampleRpc("getaddressesbylabel", "\"tabby\"")); + } LOCK(pwallet->cs_wallet); @@ -5026,7 +5027,7 @@ return NullUniValue; } - if (request.fHelp || request.params.size() > 1) + if (request.fHelp || request.params.size() > 1) { throw std::runtime_error( "listlabels ( \"purpose\" )\n" "\nReturns the list of all labels, or labels that are assigned to " @@ -5048,6 +5049,7 @@ "\nList labels that have sending addresses\n" + HelpExampleCli("listlabels", "send") + "\nAs json rpc call\n" + HelpExampleRpc("listlabels", "receive")); + } LOCK(pwallet->cs_wallet); diff --git a/src/wallet/test/wallet_crypto_tests.cpp b/src/wallet/test/wallet_crypto_tests.cpp --- a/src/wallet/test/wallet_crypto_tests.cpp +++ b/src/wallet/test/wallet_crypto_tests.cpp @@ -48,9 +48,10 @@ TestPassphraseSingle(vchSalt, passphrase, rounds, correctKey, correctIV); for (SecureString::const_iterator i(passphrase.begin()); - i != passphrase.end(); ++i) + i != passphrase.end(); ++i) { TestPassphraseSingle(vchSalt, SecureString(i, passphrase.end()), rounds); + } } static void TestDecrypt( @@ -90,8 +91,9 @@ CKeyingMaterial(vchPlaintextIn.begin(), vchPlaintextIn.end()), vchCiphertextCorrect); for (std::vector::const_iterator i(vchPlaintextIn.begin()); - i != vchPlaintextIn.end(); ++i) + i != vchPlaintextIn.end(); ++i) { TestEncryptSingle(crypt, CKeyingMaterial(i, vchPlaintextIn.end())); + } } }; @@ -108,7 +110,9 @@ std::vector vchSalt(8); GetRandBytes(vchSalt.data(), vchSalt.size()); uint32_t rounds = InsecureRand32(); - if (rounds > 30000) rounds = 30000; + if (rounds > 30000) { + rounds = 30000; + } TestCrypter::TestPassphrase(vchSalt, SecureString(hash.begin(), hash.end()), rounds); }