aboutsummaryrefslogtreecommitdiff
path: root/src/script/sigcache.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-09-11 14:33:30 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-12 17:15:40 -0700
commit0664f5fe1f77f08d235aa3750b59428257b0b91d (patch)
treefe5078625aa3e9b7cf34b51e6eb66e8fccf0d74f /src/script/sigcache.h
parent5de246ca8159dcffaa4c136a60c8bfed2028e2ee (diff)
Support for Schnorr signatures and integration in SignatureCheckers (BIP 340)
This enables the schnorrsig module in libsecp256k1, adds the relevant types and functions to src/pubkey, as well as in higher-level `SignatureChecker` classes. The (verification side of the) BIP340 test vectors is also added.
Diffstat (limited to 'src/script/sigcache.h')
-rw-r--r--src/script/sigcache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 49c6b192e9..00534f9758 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -7,6 +7,7 @@
#define BITCOIN_SCRIPT_SIGCACHE_H
#include <script/interpreter.h>
+#include <span.h>
#include <vector>
@@ -49,6 +50,7 @@ public:
CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, bool storeIn, PrecomputedTransactionData& txdataIn) : TransactionSignatureChecker(txToIn, nInIn, amountIn, txdataIn), store(storeIn) {}
bool VerifyECDSASignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const override;
+ bool VerifySchnorrSignature(Span<const unsigned char> sig, const XOnlyPubKey& pubkey, const uint256& sighash) const override;
};
void InitSignatureCache();