mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
Keep full pubkeys in FlatSigningProvider::origins
This commit is contained in:
@@ -436,7 +436,7 @@ public:
|
||||
pubkeys.reserve(entries.size());
|
||||
for (auto& entry : entries) {
|
||||
pubkeys.push_back(entry.first);
|
||||
out.origins.emplace(entry.first.GetID(), std::move(entry.second));
|
||||
out.origins.emplace(entry.first.GetID(), std::make_pair<CPubKey, KeyOriginInfo>(CPubKey(entry.first), std::move(entry.second)));
|
||||
}
|
||||
if (m_script_arg) {
|
||||
for (const auto& subscript : subscripts) {
|
||||
|
||||
@@ -483,7 +483,13 @@ bool HidingSigningProvider::GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& inf
|
||||
|
||||
bool FlatSigningProvider::GetCScript(const CScriptID& scriptid, CScript& script) const { return LookupHelper(scripts, scriptid, script); }
|
||||
bool FlatSigningProvider::GetPubKey(const CKeyID& keyid, CPubKey& pubkey) const { return LookupHelper(pubkeys, keyid, pubkey); }
|
||||
bool FlatSigningProvider::GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const { return LookupHelper(origins, keyid, info); }
|
||||
bool FlatSigningProvider::GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const
|
||||
{
|
||||
std::pair<CPubKey, KeyOriginInfo> out;
|
||||
bool ret = LookupHelper(origins, keyid, out);
|
||||
if (ret) info = std::move(out.second);
|
||||
return ret;
|
||||
}
|
||||
bool FlatSigningProvider::GetKey(const CKeyID& keyid, CKey& key) const { return LookupHelper(keys, keyid, key); }
|
||||
|
||||
FlatSigningProvider Merge(const FlatSigningProvider& a, const FlatSigningProvider& b)
|
||||
|
||||
@@ -77,7 +77,7 @@ struct FlatSigningProvider final : public SigningProvider
|
||||
{
|
||||
std::map<CScriptID, CScript> scripts;
|
||||
std::map<CKeyID, CPubKey> pubkeys;
|
||||
std::map<CKeyID, KeyOriginInfo> origins;
|
||||
std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>> origins;
|
||||
std::map<CKeyID, CKey> keys;
|
||||
|
||||
bool GetCScript(const CScriptID& scriptid, CScript& script) const override;
|
||||
|
||||
Reference in New Issue
Block a user