Keep full pubkeys in FlatSigningProvider::origins

Github-Pull: #15749
Rebased-From: 9a93c91c88
This commit is contained in:
Pieter Wuille
2019-04-04 12:45:32 -07:00
committed by MeshCollider
parent 164082c822
commit 7fcbe7dc11
5 changed files with 13 additions and 7 deletions

View File

@@ -896,7 +896,7 @@ struct ImportData
// Output data
std::set<CScript> import_scripts;
std::map<CKeyID, bool> used_keys; //!< Import these private keys if available (the value indicates whether if the key is required for solvability)
std::map<CKeyID, KeyOriginInfo> key_origins;
std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>> key_origins;
};
enum class ScriptContext
@@ -1283,7 +1283,7 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con
}
const auto& key_orig_it = import_data.key_origins.find(id);
if (key_orig_it != import_data.key_origins.end()) {
pwallet->AddKeyOrigin(pubkey, key_orig_it->second);
pwallet->AddKeyOrigin(pubkey, key_orig_it->second.second);
}
pwallet->mapKeyMetadata[id].nCreateTime = timestamp;