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

Method Unser

src/serialize.h:635–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633{
634 template<typename Stream>
635 void Unser(Stream& s, std::string& v)
636 {
637 size_t size = ReadCompactSize(s);
638 if (size > Limit) {
639 throw std::ios_base::failure("String length limit exceeded");
640 }
641 v.resize(size);
642 if (size != 0) s.read(MakeWritableByteSpan(v));
643 }
644
645 template<typename Stream>
646 void Ser(Stream& s, const std::string& v)

Callers

nothing calls this directly

Calls 4

ReadCompactSizeFunction · 0.85
MakeWritableByteSpanFunction · 0.85
resizeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected