Use ScriptExecutionData to pass through annex hash

Instead of recomputing the annex hash every time a signature is verified, compute it
once and cache it in a new ScriptExecutionData structure.
This commit is contained in:
Pieter Wuille
2020-09-11 14:33:52 -07:00
parent 8bbed4b7ac
commit 330de894a9
3 changed files with 39 additions and 16 deletions

View File

@ -33,7 +33,7 @@ public:
return m_fuzzed_data_provider.ConsumeBool();
}
bool CheckSchnorrSignature(Span<const unsigned char> sig, Span<const unsigned char> pubkey, SigVersion sigversion, ScriptError* serror = nullptr) const override
bool CheckSchnorrSignature(Span<const unsigned char> sig, Span<const unsigned char> pubkey, SigVersion sigversion, const ScriptExecutionData& execdata, ScriptError* serror = nullptr) const override
{
return m_fuzzed_data_provider.ConsumeBool();
}