Currently the getaddressinfo RPC call accesses the wallet metadata directly:
if (!meta->hdKeypath.empty()) {
ret.pushKV("hdkeypath", meta->hdKeypath);
ret.pushKV("hdseedid", meta->hd_seed_id.GetHex());
if (!meta->master_key_id.IsNull()) {
ret.pushKV("hdmasterkeyid", meta->master_key_id.GetHex());
}
}
CWallet::GetKeyOrigin was introduced in https://github.com/bitcoin/bitcoin/pull/13723/commits/03a99586a398ee38f40c3b72d24c6a2ba4b88579
Probably not urgent, but I noticed this issue while debugging a problem on an experimental branch where getaddressinfo showed the origin info just fine but GetKeyOrigin failed.