aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-07-19 17:25:21 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-08-13 08:46:23 -0700
commit84f1f1bfdf900cd28099e428441aa42f9d11a0ed (patch)
treef207338b3689a063f982553eafb311055fbaaa1d /src
parent611ab307fbd8b6f8f7ffc1d569bb86d1f9cb4e92 (diff)
Make SigningProvider expose key origin information
Diffstat (limited to 'src')
-rw-r--r--src/script/sign.cpp9
-rw-r--r--src/script/sign.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 1982e8a832..47931e21d9 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -645,9 +645,14 @@ bool PublicOnlySigningProvider::GetCScript(const CScriptID &scriptid, CScript& s
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); }
diff --git a/src/script/sign.h b/src/script/sign.h
index e0668f8c58..323fe70f34 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -34,6 +34,7 @@ public:
virtual bool GetCScript(const CScriptID &scriptid, CScript& script) 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 GetKeyOrigin(const CKeyID& id, KeyOriginInfo& info) const { return false; }
};
extern const SigningProvider& DUMMY_SIGNING_PROVIDER;
@@ -47,6 +48,7 @@ public:
PublicOnlySigningProvider(const SigningProvider* provider) : m_provider(provider) {}
bool GetCScript(const CScriptID &scriptid, CScript& script) const;
bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const;
+ bool GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const;
};
struct FlatSigningProvider final : public SigningProvider