Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 689 Lines • ▼ Show 20 Lines | bool fGood = true; | ||||
"Skipping import of %s (key already present)\n", | "Skipping import of %s (key already present)\n", | ||||
EncodeDestination(keyid, config)); | EncodeDestination(keyid, config)); | ||||
continue; | continue; | ||||
} | } | ||||
int64_t nTime = DecodeDumpTime(vstr[1]); | int64_t nTime = DecodeDumpTime(vstr[1]); | ||||
std::string strLabel; | std::string strLabel; | ||||
bool fLabel = true; | bool fLabel = true; | ||||
for (unsigned int nStr = 2; nStr < vstr.size(); nStr++) { | for (unsigned int nStr = 2; nStr < vstr.size(); nStr++) { | ||||
if (boost::algorithm::starts_with(vstr[nStr], "#")) { | if (vstr[nStr].front() == '#') { | ||||
break; | break; | ||||
} | } | ||||
if (vstr[nStr] == "change=1") { | if (vstr[nStr] == "change=1") { | ||||
fLabel = false; | fLabel = false; | ||||
} | } | ||||
if (vstr[nStr] == "reserve=1") { | if (vstr[nStr] == "reserve=1") { | ||||
fLabel = false; | fLabel = false; | ||||
} | } | ||||
if (boost::algorithm::starts_with(vstr[nStr], "label=")) { | if (vstr[nStr].substr(0, 6) == "label=") { | ||||
strLabel = DecodeDumpString(vstr[nStr].substr(6)); | strLabel = DecodeDumpString(vstr[nStr].substr(6)); | ||||
fLabel = true; | fLabel = true; | ||||
} | } | ||||
} | } | ||||
pwallet->WalletLogPrintf("Importing %s...\n", | pwallet->WalletLogPrintf("Importing %s...\n", | ||||
EncodeDestination(keyid, config)); | EncodeDestination(keyid, config)); | ||||
if (!pwallet->AddKeyPubKey(key, pubkey)) { | if (!pwallet->AddKeyPubKey(key, pubkey)) { | ||||
fGood = false; | fGood = false; | ||||
▲ Show 20 Lines • Show All 812 Lines • Show Last 20 Lines |