mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Remove template matching and pseudo opcodes
The current code contains a rather complex script template matching engine, which is only used for 3 particular script types (P2PK, P2PKH, multisig). The first two of these are trivial to match for otherwise, and a specialized matcher for multisig is both more compact and more efficient than a generic one. The goal is being more flexible, so that for example larger standard multisigs inside SegWit outputs are more easy to implement. As a side-effect, it also gets rid of the pseudo opcodes hack.
This commit is contained in:
@@ -33,10 +33,10 @@ public:
|
||||
/**
|
||||
* secp256k1:
|
||||
*/
|
||||
static const unsigned int PUBLIC_KEY_SIZE = 65;
|
||||
static const unsigned int COMPRESSED_PUBLIC_KEY_SIZE = 33;
|
||||
static const unsigned int SIGNATURE_SIZE = 72;
|
||||
static const unsigned int COMPACT_SIGNATURE_SIZE = 65;
|
||||
static constexpr unsigned int PUBLIC_KEY_SIZE = 65;
|
||||
static constexpr unsigned int COMPRESSED_PUBLIC_KEY_SIZE = 33;
|
||||
static constexpr unsigned int SIGNATURE_SIZE = 72;
|
||||
static constexpr unsigned int COMPACT_SIGNATURE_SIZE = 65;
|
||||
/**
|
||||
* see www.keylength.com
|
||||
* script supports up to 75 for single byte push
|
||||
|
||||
Reference in New Issue
Block a user