mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Update validator config format; partial liteservers and their support in liteclient
This commit is contained in:
parent
a792565afa
commit
51e6885f2c
12 changed files with 657 additions and 363 deletions
|
@ -1101,7 +1101,7 @@ td::Status AddCollatorQuery::run() {
|
|||
|
||||
td::Status AddCollatorQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_addCollator>(
|
||||
adnl_id_.tl(), wc_, shard_);
|
||||
adnl_id_.tl(), ton::create_tl_shard_id(ton::ShardIdFull(wc_, shard_)));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
@ -1112,3 +1112,23 @@ td::Status AddCollatorQuery::receive(td::BufferSlice data) {
|
|||
td::TerminalIO::out() << "successfully added collator\n";
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status AddShardQuery::run() {
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status AddShardQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_addShard>(
|
||||
ton::create_tl_shard_id(ton::ShardIdFull(wc_, shard_)));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status AddShardQuery::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 shard\n";
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue