Make SigningProvider expose key origin information
This commit is contained in:
parent
611ab307fb
commit
84f1f1bfdf
2 changed files with 9 additions and 2 deletions
|
@ -645,9 +645,14 @@ bool PublicOnlySigningProvider::GetCScript(const CScriptID &scriptid, CScript& s
|
||||||
return m_provider->GetCScript(scriptid, script);
|
return m_provider->GetCScript(scriptid, script);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PublicOnlySigningProvider::GetPubKey(const CKeyID &address, CPubKey& pubkey) const
|
bool PublicOnlySigningProvider::GetPubKey(const CKeyID& keyid, CPubKey& pubkey) const
|
||||||
{
|
{
|
||||||
return m_provider->GetPubKey(address, pubkey);
|
return m_provider->GetPubKey(keyid, pubkey);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PublicOnlySigningProvider::GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const
|
||||||
|
{
|
||||||
|
return m_provider->GetKeyOrigin(keyid, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FlatSigningProvider::GetCScript(const CScriptID& scriptid, CScript& script) const { return LookupHelper(scripts, scriptid, script); }
|
bool FlatSigningProvider::GetCScript(const CScriptID& scriptid, CScript& script) const { return LookupHelper(scripts, scriptid, script); }
|
||||||
|
|
|
@ -34,6 +34,7 @@ public:
|
||||||
virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const { return false; }
|
virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const { return false; }
|
||||||
virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const { return false; }
|
virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const { return false; }
|
||||||
virtual bool GetKey(const CKeyID &address, CKey& key) const { return false; }
|
virtual bool GetKey(const CKeyID &address, CKey& key) const { return false; }
|
||||||
|
virtual bool GetKeyOrigin(const CKeyID& id, KeyOriginInfo& info) const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const SigningProvider& DUMMY_SIGNING_PROVIDER;
|
extern const SigningProvider& DUMMY_SIGNING_PROVIDER;
|
||||||
|
@ -47,6 +48,7 @@ public:
|
||||||
PublicOnlySigningProvider(const SigningProvider* provider) : m_provider(provider) {}
|
PublicOnlySigningProvider(const SigningProvider* provider) : m_provider(provider) {}
|
||||||
bool GetCScript(const CScriptID &scriptid, CScript& script) const;
|
bool GetCScript(const CScriptID &scriptid, CScript& script) const;
|
||||||
bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const;
|
bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const;
|
||||||
|
bool GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FlatSigningProvider final : public SigningProvider
|
struct FlatSigningProvider final : public SigningProvider
|
||||||
|
|
Loading…
Reference in a new issue