Add more debug logging.

GitOrigin-RevId: 047dbe63624ba0e810b245689c305e600e0a87f2
This commit is contained in:
levlam 2018-08-06 19:04:21 +03:00
parent ff593d2ce8
commit f1295eba9b
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@
//
#include "td/telegram/net/NetQueryCreator.h"
#include "td/utils/format.h"
#include "td/utils/Gzip.h"
#include "td/utils/logging.h"
@ -16,7 +17,8 @@ NetQueryCreator::Ptr NetQueryCreator::create(uint64 id, const Storer &storer, Dc
double total_timeout_limit) {
BufferSlice slice(storer.size());
auto real_size = storer.store(slice.as_slice().ubegin());
CHECK(real_size == slice.size());
CHECK(real_size == slice.size()) << real_size << " " << slice.size() << " "
<< format::as_hex_dump<4>(Slice(slice.as_slice()));
// TODO: magic constant
if (slice.size() < (1 << 8)) {

View File

@ -20,7 +20,7 @@ PublicRsaKeyShared::PublicRsaKeyShared(DcId dc_id) : dc_id_(dc_id) {
}
auto add_pem = [this](CSlice pem) {
auto r_rsa = RSA::from_pem(pem);
CHECK(r_rsa.is_ok()) << r_rsa.error();
CHECK(r_rsa.is_ok()) << r_rsa.error() << " " << pem;
if (r_rsa.is_ok()) {
this->add_rsa(r_rsa.move_as_ok());