|
|
|
@ -4550,3 +4550,13 @@ bool CWallet::GetKeyOrigin(const CKeyID& keyID, KeyOriginInfo& info) const
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CWallet::AddKeyOrigin(const CPubKey& pubkey, const KeyOriginInfo& info)
|
|
|
|
|
{
|
|
|
|
|
LOCK(cs_wallet);
|
|
|
|
|
std::copy(info.fingerprint, info.fingerprint + 4, mapKeyMetadata[pubkey.GetID()].key_origin.fingerprint);
|
|
|
|
|
mapKeyMetadata[pubkey.GetID()].key_origin.path = info.path;
|
|
|
|
|
mapKeyMetadata[pubkey.GetID()].has_key_origin = true;
|
|
|
|
|
mapKeyMetadata[pubkey.GetID()].hdKeypath = WriteHDKeypath(info.path);
|
|
|
|
|
return WriteKeyMetadata(mapKeyMetadata[pubkey.GetID()], pubkey, true);
|
|
|
|
|
}
|
|
|
|
|