| 349 | } |
| 350 | |
| 351 | static 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 | |
| 374 | std::ostream& dev::operator<<(std::ostream& _out, RLP const& _d) |
| 375 | { |