mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Implement Taproot signature hashing (BIP 341)
This implements the new sighashing scheme from BIP341, with all relevant whole-transaction values precomputed once and cached. Includes changes to PrecomputedTransactionData by Pieter Wuille.
This commit is contained in:
parent
9eb590894f
commit
5de246ca81
4 changed files with 164 additions and 13 deletions
|
|
@ -44,6 +44,11 @@ static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20
|
|||
// SEQUENCE_FINAL).
|
||||
static const uint32_t LOCKTIME_MAX = 0xFFFFFFFFU;
|
||||
|
||||
// Tag for input annex. If there are at least two witness elements for a transaction input,
|
||||
// and the first byte of the last element is 0x50, this last element is called annex, and
|
||||
// has meanings independent of the script
|
||||
static constexpr unsigned int ANNEX_TAG = 0x50;
|
||||
|
||||
template <typename T>
|
||||
std::vector<unsigned char> ToByteVector(const T& in)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue