From 160b539eaad7bc97b7e238168756cca676a5f3be Mon Sep 17 00:00:00 2001 From: SpyCheese Date: Wed, 11 Dec 2024 16:07:48 +0300 Subject: [PATCH] Add logs add-collator --- .../validator-engine-console-query.cpp | 8 ++++++-- validator-engine-console/validator-engine-console-query.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/validator-engine-console/validator-engine-console-query.cpp b/validator-engine-console/validator-engine-console-query.cpp index d229b9329..182234067 100644 --- a/validator-engine-console/validator-engine-console-query.cpp +++ b/validator-engine-console/validator-engine-console-query.cpp @@ -1607,7 +1607,9 @@ td::Status AddCollatorQuery::send() { td::Status AddCollatorQuery::receive(td::BufferSlice data) { TRY_RESULT_PREFIX(f, ton::fetch_tl_object(data.as_slice(), true), "received incorrect answer: "); - td::TerminalIO::out() << "successfully added collator\n"; + td::TerminalIO::out() << "successfully added collator for shard " << shard_.to_str() << "\n"; + td::TerminalIO::out() << "ADNL ID = " << adnl_id_.bits256_value().to_hex() << " (" << adnl_id_.bits256_value() + << ")\n"; return td::Status::OK(); } @@ -1627,7 +1629,9 @@ td::Status DelCollatorQuery::send() { td::Status DelCollatorQuery::receive(td::BufferSlice data) { TRY_RESULT_PREFIX(f, ton::fetch_tl_object(data.as_slice(), true), "received incorrect answer: "); - td::TerminalIO::out() << "successfully removed collator\n"; + td::TerminalIO::out() << "successfully removed collator for shard " << shard_.to_str() << "\n"; + td::TerminalIO::out() << "ADNL ID = " << adnl_id_.bits256_value().to_hex() << " (" << adnl_id_.bits256_value() + << ")\n"; return td::Status::OK(); } diff --git a/validator-engine-console/validator-engine-console-query.h b/validator-engine-console/validator-engine-console-query.h index 417374518..ad9f7c3b3 100644 --- a/validator-engine-console/validator-engine-console-query.h +++ b/validator-engine-console/validator-engine-console-query.h @@ -151,8 +151,8 @@ inline td::Result Tokenizer::get_token() { auto r_wc = td::to_integer_safe(word); if (r_wc.is_ok()) { TRY_RESULT_ASSIGN(word, get_raw_token()); - TRY_RESULT(shard, td::to_integer_safe(word)); - return ton::ShardIdFull{r_wc.move_as_ok(), shard}; + TRY_RESULT(shard, td::to_integer_safe(word)); + return ton::ShardIdFull{r_wc.move_as_ok(), (ton::ShardId)shard}; } return ton::ShardIdFull::parse(word); }