MCPcopy Create free account
hub / github.com/LUX-Core/lux / streamOut

Function streamOut

src/cpp-ethereum/libdevcore/RLP.cpp:351–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static void streamOut(std::ostream& _out, dev::RLP const& _d, unsigned _depth = 0)
352{
353 if (_depth > 64)
354 _out << "<max-depth-reached>";
355 else if (_d.isNull())
356 _out << "null";
357 else if (_d.isInt())
358 _out << std::showbase << std::hex << std::nouppercase << _d.toInt<bigint>(RLP::LaissezFaire) << dec;
359 else if (_d.isData())
360 _out << escaped(_d.toString(), false);
361 else if (_d.isList())
362 {
363 _out << "[";
364 int j = 0;
365 for (auto i: _d)
366 {
367 _out << (j++ ? ", " : " ");
368 streamOut(_out, i, _depth + 1);
369 }
370 _out << " ]";
371 }
372}
373
374std::ostream& dev::operator<<(std::ostream& _out, RLP const& _d)
375{

Callers 1

RLP.cppFile · 0.85

Calls 5

isIntMethod · 0.80
isDataMethod · 0.80
isNullMethod · 0.45
toStringMethod · 0.45
isListMethod · 0.45

Tested by

no test coverage detected