aboutsummaryrefslogtreecommitdiff
path: root/src/streams.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-12-17 15:56:37 -0500
committerRussell Yanofsky <russ@yanofsky.org>2023-10-20 09:30:16 -0500
commit82a379eca8251c736b4de6e7a2516582641ce397 (patch)
tree7f1831810608eb1b9891c26dd4c48fdcde1cbcbe /src/streams.h
parentabfc8c901df6853c1a52b7350f4c18dc70269ec9 (diff)
downloadbitcoin-82a379eca8251c736b4de6e7a2516582641ce397.tar.xz
streams: Add SpanReader ignore method
Needed to deserialize some types from spans like CScripts
Diffstat (limited to 'src/streams.h')
-rw-r--r--src/streams.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/streams.h b/src/streams.h
index d58de5233b..ae1434cc1c 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.