Make it clear which functions that are intended to be translation unit local

Do not share functions that are meant to be translation unit local with
other translation units. Use internal linkage for those consistently.
This commit is contained in:
practicalswift
2018-05-02 17:14:48 +02:00
parent 7eb7076f70
commit c3f34d06be
43 changed files with 226 additions and 226 deletions
+7 -7
View File
@@ -51,7 +51,7 @@ std::string static EncodeDumpString(const std::string &str) {
return ret.str();
}
std::string DecodeDumpString(const std::string &str) {
static std::string DecodeDumpString(const std::string &str) {
std::stringstream ret;
for (unsigned int pos = 0; pos < str.length(); pos++) {
unsigned char c = str[pos];
@@ -65,7 +65,7 @@ std::string DecodeDumpString(const std::string &str) {
return ret.str();
}
bool GetWalletAddressesForKey(CWallet * const pwallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel)
static bool GetWalletAddressesForKey(CWallet * const pwallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel)
{
bool fLabelFound = false;
CKey key;
@@ -208,8 +208,8 @@ UniValue abortrescan(const JSONRPCRequest& request)
return true;
}
void ImportAddress(CWallet*, const CTxDestination& dest, const std::string& strLabel);
void ImportScript(CWallet* const pwallet, const CScript& script, const std::string& strLabel, bool isRedeemScript)
static void ImportAddress(CWallet*, const CTxDestination& dest, const std::string& strLabel);
static void ImportScript(CWallet* const pwallet, const CScript& script, const std::string& strLabel, bool isRedeemScript)
{
if (!isRedeemScript && ::IsMine(*pwallet, script) == ISMINE_SPENDABLE) {
throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
@@ -235,7 +235,7 @@ void ImportScript(CWallet* const pwallet, const CScript& script, const std::stri
}
}
void ImportAddress(CWallet* const pwallet, const CTxDestination& dest, const std::string& strLabel)
static void ImportAddress(CWallet* const pwallet, const CTxDestination& dest, const std::string& strLabel)
{
CScript script = GetScriptForDestination(dest);
ImportScript(pwallet, script, strLabel, false);
@@ -811,7 +811,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
}
UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int64_t timestamp)
static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int64_t timestamp)
{
try {
bool success = false;
@@ -1111,7 +1111,7 @@ UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int6
}
}
int64_t GetImportTimestamp(const UniValue& data, int64_t now)
static int64_t GetImportTimestamp(const UniValue& data, int64_t now)
{
if (data.exists("timestamp")) {
const UniValue& timestamp = data["timestamp"];