MCPcopy Create free account
hub / github.com/ElementsProject/elements / FindByte

Method FindByte

src/streams.h:711–721  ·  view source on GitHub ↗

search for a given byte in the stream, and remain positioned on it

Source from the content-addressed store, hash-verified

709
710 //! search for a given byte in the stream, and remain positioned on it
711 void FindByte(uint8_t ch)
712 {
713 while (true) {
714 if (m_read_pos == nSrcPos)
715 Fill();
716 if (vchBuf[m_read_pos % vchBuf.size()] == std::byte{ch}) {
717 break;
718 }
719 m_read_pos++;
720 }
721 }
722};
723
724#endif // BITCOIN_STREAMS_H

Callers 3

LoadExternalBlockFileMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64