| 64 | } |
| 65 | |
| 66 | static std::string DecodeDumpString(const std::string &str) { |
| 67 | std::stringstream ret; |
| 68 | for (unsigned int pos = 0; pos < str.length(); pos++) { |
| 69 | unsigned char c = str[pos]; |
| 70 | if (c == '%' && pos+2 < str.length()) { |
| 71 | c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) | |
| 72 | ((str[pos+2]>>6)*9+((str[pos+2]-'0')&15)); |
| 73 | pos += 2; |
| 74 | } |
| 75 | ret << c; |
| 76 | } |
| 77 | return ret.str(); |
| 78 | } |
| 79 | |
| 80 | static bool GetWalletAddressesForKey(const LegacyScriptPubKeyMan* spk_man, const CWallet& wallet, const CKeyID& keyid, std::string& strAddr, std::string& strLabel) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) |
| 81 | { |