1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Get rid of std::cerr logs in collator/validator

This commit is contained in:
SpyCheese 2025-02-13 14:25:04 +03:00
parent 3c245c6146
commit ce6c29941e
14 changed files with 310 additions and 200 deletions

View file

@ -196,6 +196,13 @@ bool TLB::print_ref(std::ostream& os, Ref<vm::Cell> cell_ref, int indent, int re
return pp.fail_unless(print_ref(pp, std::move(cell_ref)));
}
bool TLB::print_ref(td::StringBuilder& sb, Ref<vm::Cell> cell_ref, int indent, int rec_limit) const {
std::ostringstream ss;
auto result = print_ref(ss, std::move(cell_ref), indent, rec_limit);
sb << ss.str();
return result;
}
std::string TLB::as_string_skip(vm::CellSlice& cs, int indent) const {
std::ostringstream os;
print_skip(os, cs, indent);

View file

@ -246,7 +246,14 @@ class TLB {
bool print(std::ostream& os, Ref<vm::CellSlice> cs_ref, int indent = 0, int rec_limit = 0) const {
return print(os, *cs_ref, indent, rec_limit);
}
bool print(td::StringBuilder& sb, Ref<vm::CellSlice> cs_ref, int indent = 0, int rec_limit = 0) const {
std::ostringstream ss;
auto result = print(ss, *cs_ref, indent, rec_limit);
sb << ss.str();
return result;
}
bool print_ref(std::ostream& os, Ref<vm::Cell> cell_ref, int indent = 0, int rec_limit = 0) const;
bool print_ref(td::StringBuilder& sb, Ref<vm::Cell> cell_ref, int indent = 0, int rec_limit = 0) const;
bool print_ref(int rec_limit, std::ostream& os, Ref<vm::Cell> cell_ref, int indent = 0) const {
return print_ref(os, std::move(cell_ref), indent, rec_limit);
}