diff options
author | Andrew Chow <achow101-github@achow101.com> | 2018-06-07 21:12:25 -0700 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2018-07-03 17:19:23 -0700 |
commit | ed94c8b556dbbfb62452eaefd9ee7841df09777a (patch) | |
tree | fa645726fb0ac8f6bcd23cb0a7d91ad1641147a6 /src/script/sign.h | |
parent | 0422beb9bdfcd7d1cc095ab681a760d8bc7a1918 (diff) |
Replace CombineSignatures with ProduceSignature
Instead of using CombineSignatures to create the final scriptSig or
scriptWitness of an input, use ProduceSignature itself.
To allow for ProduceSignature to place signatures, pubkeys, and scripts
that it does not know about, we pass down the SignatureData to SignStep
which pulls out the information that it needs from the SignatureData.
Diffstat (limited to 'src/script/sign.h')
-rw-r--r-- | src/script/sign.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/script/sign.h b/src/script/sign.h index 7dc4bedb06..c8bccc432f 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -21,11 +21,13 @@ class SigningProvider { public: virtual ~SigningProvider() {} - virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const =0; - virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const =0; - virtual bool GetKey(const CKeyID &address, CKey& key) const =0; + 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; } }; +extern const SigningProvider& DUMMY_SIGNING_PROVIDER; + /** Interface for signature creators. */ class BaseSignatureCreator { public: @@ -68,6 +70,7 @@ struct SignatureData { SignatureData() {} explicit SignatureData(const CScript& script) : scriptSig(script) {} + void MergeSignatureData(SignatureData sigdata); }; /** Produce a script signature using a generic signature creator. */ |