From 11daf6ceb1d9ea1f8d638b123eecfe39d162a7c3 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 2 Nov 2021 10:07:46 -0400 Subject: More Span simplifications Based on suggestions by MarcoFalke --- src/signet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/signet.cpp') diff --git a/src/signet.cpp b/src/signet.cpp index aafd1999ee..40d6ae2f3c 100644 --- a/src/signet.cpp +++ b/src/signet.cpp @@ -38,7 +38,7 @@ static bool FetchAndClearCommitmentSection(const Span header, CSc std::vector pushdata; while (witness_commitment.GetOp(pc, opcode, pushdata)) { if (pushdata.size() > 0) { - if (!found_header && pushdata.size() > (size_t) header.size() && Span(pushdata.data(), header.size()) == header) { + if (!found_header && pushdata.size() > (size_t)header.size() && 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()); -- cgit v1.2.3