mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge 80f00cafde into merged_master (Bitcoin PR bitcoin/bitcoin#29071)
This commit is contained in:
commit
ce9cd2dfd7
21 changed files with 76 additions and 74 deletions
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
#include <signet.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include <common/system.h>
|
||||
#include <consensus/merkle.h>
|
||||
#include <consensus/params.h>
|
||||
|
|
@ -23,6 +19,11 @@
|
|||
#include <uint256.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
static constexpr uint8_t SIGNET_HEADER[4] = {0xec, 0xc7, 0xda, 0xa2};
|
||||
|
||||
static constexpr unsigned int BLOCK_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_NULLDUMMY;
|
||||
|
|
@ -38,7 +39,7 @@ static bool FetchAndClearCommitmentSection(const Span<const uint8_t> header, CSc
|
|||
std::vector<uint8_t> pushdata;
|
||||
while (witness_commitment.GetOp(pc, opcode, pushdata)) {
|
||||
if (pushdata.size() > 0) {
|
||||
if (!found_header && pushdata.size() > (size_t)header.size() && Span{pushdata}.first(header.size()) == header) {
|
||||
if (!found_header && pushdata.size() > header.size() && std::ranges::equal(Span{pushdata}.first(header.size()), header)) {
|
||||
// pushdata only counts if it has the header _and_ some data
|
||||
result.insert(result.end(), pushdata.begin() + header.size(), pushdata.end());
|
||||
pushdata.erase(pushdata.begin() + header.size(), pushdata.end());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue