diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-07-12 15:03:55 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-07-27 11:52:18 -0700 |
commit | e54d76044b3a2c625e53f2116c5f6a7c40105d5d (patch) | |
tree | cc37fd50595bebfdbfd4383b356e37cd115a3381 /src/script/sign.h | |
parent | 29943a904a11607787d28b1f4288f500bd076dde (diff) |
Add simple FlatSigningProvider
Diffstat (limited to 'src/script/sign.h')
-rw-r--r-- | src/script/sign.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/script/sign.h b/src/script/sign.h index d12d0b5874..96ef59fbe8 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -43,6 +43,19 @@ public: bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const; }; +struct FlatSigningProvider final : public SigningProvider +{ + std::map<CScriptID, CScript> scripts; + std::map<CKeyID, CPubKey> pubkeys; + std::map<CKeyID, CKey> keys; + + bool GetCScript(const CScriptID& scriptid, CScript& script) const override; + bool GetPubKey(const CKeyID& keyid, CPubKey& pubkey) const override; + bool GetKey(const CKeyID& keyid, CKey& key) const override; +}; + +FlatSigningProvider Merge(const FlatSigningProvider& a, const FlatSigningProvider& b); + /** Interface for signature creators. */ class BaseSignatureCreator { public: |