1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-14 12:12:21 +00:00

Add logs add-collator

This commit is contained in:
SpyCheese 2024-12-11 16:07:48 +03:00
parent 50ee01557f
commit 160b539eaa
2 changed files with 8 additions and 4 deletions

View file

@ -1607,7 +1607,9 @@ td::Status AddCollatorQuery::send() {
td::Status AddCollatorQuery::receive(td::BufferSlice data) {
TRY_RESULT_PREFIX(f, ton::fetch_tl_object<ton::ton_api::engine_validator_success>(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<ton::ton_api::engine_validator_success>(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();
}

View file

@ -151,8 +151,8 @@ inline td::Result<ton::ShardIdFull> Tokenizer::get_token() {
auto r_wc = td::to_integer_safe<ton::WorkchainId>(word);
if (r_wc.is_ok()) {
TRY_RESULT_ASSIGN(word, get_raw_token());
TRY_RESULT(shard, td::to_integer_safe<ton::ShardId>(word));
return ton::ShardIdFull{r_wc.move_as_ok(), shard};
TRY_RESULT(shard, td::to_integer_safe<td::int64>(word));
return ton::ShardIdFull{r_wc.move_as_ok(), (ton::ShardId)shard};
}
return ton::ShardIdFull::parse(word);
}