[wallet] Add ProcessImportLegacy()

This commit adds a ProcessImportLegacy() function which
currently does nothing. It also unindents a block of
code for a future move-only change.

Reviewer hint: review with -w to ignore whitespace changes.
This commit is contained in:
John Newbery 2019-01-11 16:42:43 -05:00 committed by MeshCollider
parent a1b25e12a5
commit 4cac0ddd25

View file

@ -964,6 +964,12 @@ static std::string RecurseImportData(const CScript& script, ImportData& import_d
} }
} }
static UniValue ProcessImportLegacy(ImportData& import_data, std::map<CKeyID, CPubKey>& pubkey_map, std::map<CKeyID, CKey>& privkey_map, std::set<CScript>& script_pub_keys, bool& have_solving_data, const UniValue& data)
{
UniValue warnings(UniValue::VARR);
return warnings;
}
static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)
{ {
UniValue warnings(UniValue::VARR); UniValue warnings(UniValue::VARR);
@ -983,6 +989,8 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con
std::set<CScript> script_pub_keys; std::set<CScript> script_pub_keys;
bool have_solving_data; bool have_solving_data;
warnings = ProcessImportLegacy(import_data, pubkey_map, privkey_map, script_pub_keys, have_solving_data, data);
// First ensure scriptPubKey has either a script or JSON with "address" string // First ensure scriptPubKey has either a script or JSON with "address" string
const UniValue& scriptPubKey = data["scriptPubKey"]; const UniValue& scriptPubKey = data["scriptPubKey"];
bool isScript = scriptPubKey.getType() == UniValue::VSTR; bool isScript = scriptPubKey.getType() == UniValue::VSTR;