MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SkipTo

Method SkipTo

src/streams.h:578–582  ·  view source on GitHub ↗

Move the read position ahead in the stream to the given position. Use SetPos() to back up in the stream, not SkipTo().

Source from the content-addressed store, hash-verified

576 //! Move the read position ahead in the stream to the given position.
577 //! Use SetPos() to back up in the stream, not SkipTo().
578 void SkipTo(const uint64_t file_pos)
579 {
580 assert(file_pos >= m_read_pos);
581 while (m_read_pos < file_pos) AdvanceStream(file_pos - m_read_pos);
582 }
583
584 //! return the current reading position
585 uint64_t GetPos() const {

Callers 2

LoadExternalBlockFileMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64