| 52 | } |
| 53 | |
| 54 | static std::string DecodeDumpString(const std::string &str) { |
| 55 | std::stringstream ret; |
| 56 | for (unsigned int pos = 0; pos < str.length(); pos++) { |
| 57 | unsigned char c = str[pos]; |
| 58 | if (c == '%' && pos+2 < str.length()) { |
| 59 | c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) | |
| 60 | ((str[pos+2]>>6)*9+((str[pos+2]-'0')&15)); |
| 61 | pos += 2; |
| 62 | } |
| 63 | ret << c; |
| 64 | } |
| 65 | return ret.str(); |
| 66 | } |
| 67 | |
| 68 | static bool GetWalletAddressesForKey(CWallet * const pwallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel) |
| 69 | { |