From 82a379eca8251c736b4de6e7a2516582641ce397 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 17 Dec 2021 15:56:37 -0500 Subject: [PATCH] streams: Add SpanReader ignore method Needed to deserialize some types from spans like CScripts --- src/streams.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/streams.h b/src/streams.h index d58de5233bc..ae1434cc1c6 100644 --- a/src/streams.h +++ b/src/streams.h @@ -182,6 +182,11 @@ public: memcpy(dst.data(), m_data.data(), dst.size()); m_data = m_data.subspan(dst.size()); } + + void ignore(size_t n) + { + m_data = m_data.subspan(n); + } }; /** Double ended buffer combining vector and stream-like interfaces.