Change GetMetadata to use unique_ptr<CKeyMetadata>

This commit is contained in:
Andrew Chow
2019-11-06 20:55:34 -05:00
parent 72a9540df9
commit 8b9603bd0b
3 changed files with 8 additions and 8 deletions

View File

@@ -3820,7 +3820,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
ScriptPubKeyMan* spk_man = pwallet->GetScriptPubKeyMan(scriptPubKey);
if (spk_man) {
if (const CKeyMetadata* meta = spk_man->GetMetadata(dest)) {
if (const std::unique_ptr<CKeyMetadata> meta = spk_man->GetMetadata(dest)) {
ret.pushKV("timestamp", meta->nCreateTime);
if (meta->has_key_origin) {
ret.pushKV("hdkeypath", WriteHDKeypath(meta->key_origin.path));