mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into accelerator
This commit is contained in:
commit
50ee01557f
10 changed files with 444 additions and 386 deletions
|
|
@ -1035,8 +1035,7 @@ td::Status ImportCertificateQuery::receive(td::BufferSlice data) {
|
|||
}
|
||||
|
||||
td::Status SignShardOverlayCertificateQuery::run() {
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>() );
|
||||
TRY_RESULT_ASSIGN(key_, tokenizer_.get_token<ton::PublicKeyHash>());
|
||||
TRY_RESULT_ASSIGN(expire_at_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(max_size_, tokenizer_.get_token<td::uint32>());
|
||||
|
|
@ -1047,7 +1046,8 @@ td::Status SignShardOverlayCertificateQuery::run() {
|
|||
|
||||
td::Status SignShardOverlayCertificateQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_signShardOverlayCertificate>(
|
||||
wc_, shard_, ton::create_tl_object<ton::ton_api::engine_validator_keyHash>(key_.tl()), expire_at_, max_size_);
|
||||
shard_.workchain, shard_.shard, ton::create_tl_object<ton::ton_api::engine_validator_keyHash>(key_.tl()),
|
||||
expire_at_, max_size_);
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1065,8 +1065,7 @@ td::Status SignShardOverlayCertificateQuery::receive(td::BufferSlice data) {
|
|||
}
|
||||
|
||||
td::Status ImportShardOverlayCertificateQuery::run() {
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
TRY_RESULT_ASSIGN(key_, tokenizer_.get_token<ton::PublicKeyHash>());
|
||||
TRY_RESULT_ASSIGN(in_file_, tokenizer_.get_token<std::string>());
|
||||
|
||||
|
|
@ -1078,7 +1077,8 @@ td::Status ImportShardOverlayCertificateQuery::send() {
|
|||
TRY_RESULT_PREFIX(cert, ton::fetch_tl_object<ton::ton_api::overlay_Certificate>(data.as_slice(), true),
|
||||
"incorrect certificate");
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_importShardOverlayCertificate>(
|
||||
wc_, shard_, ton::create_tl_object<ton::ton_api::engine_validator_keyHash>(key_.tl()), std::move(cert));
|
||||
shard_.workchain, shard_.shard, ton::create_tl_object<ton::ton_api::engine_validator_keyHash>(key_.tl()),
|
||||
std::move(cert));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1167,14 +1167,12 @@ td::Status GetPerfTimerStatsJsonQuery::receive(td::BufferSlice data) {
|
|||
}
|
||||
|
||||
td::Status GetShardOutQueueSizeQuery::run() {
|
||||
TRY_RESULT_ASSIGN(block_id_.workchain, tokenizer_.get_token<int>());
|
||||
TRY_RESULT_ASSIGN(block_id_.shard, tokenizer_.get_token<long long>());
|
||||
TRY_RESULT(shard, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
block_id_.workchain = shard.workchain;
|
||||
block_id_.shard = shard.shard;
|
||||
TRY_RESULT_ASSIGN(block_id_.seqno, tokenizer_.get_token<int>());
|
||||
if (!tokenizer_.endl()) {
|
||||
ton::ShardIdFull dest;
|
||||
TRY_RESULT_ASSIGN(dest.workchain, tokenizer_.get_token<int>());
|
||||
TRY_RESULT_ASSIGN(dest.shard, tokenizer_.get_token<long long>());
|
||||
dest_ = dest;
|
||||
TRY_RESULT_ASSIGN(dest_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
}
|
||||
TRY_STATUS(tokenizer_.check_endl());
|
||||
return td::Status::OK();
|
||||
|
|
@ -1182,8 +1180,7 @@ td::Status GetShardOutQueueSizeQuery::run() {
|
|||
|
||||
td::Status GetShardOutQueueSizeQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_getShardOutQueueSize>(
|
||||
dest_ ? 1 : 0, ton::create_tl_block_id_simple(block_id_), dest_ ? dest_.value().workchain : 0,
|
||||
dest_ ? dest_.value().shard : 0);
|
||||
dest_.is_valid() ? 1 : 0, ton::create_tl_block_id_simple(block_id_), dest_.workchain, dest_.shard);
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1557,14 +1554,13 @@ td::Status GetAdnlStatsQuery::receive(td::BufferSlice data) {
|
|||
}
|
||||
|
||||
td::Status AddShardQuery::run() {
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
TRY_STATUS(tokenizer_.check_endl());
|
||||
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_)));
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_addShard>(ton::create_tl_shard_id(shard_));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1577,14 +1573,13 @@ td::Status AddShardQuery::receive(td::BufferSlice data) {
|
|||
}
|
||||
|
||||
td::Status DelShardQuery::run() {
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
TRY_STATUS(tokenizer_.check_endl());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status DelShardQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_delShard>(
|
||||
ton::create_tl_shard_id(ton::ShardIdFull(wc_, shard_)));
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_delShard>(ton::create_tl_shard_id(shard_));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1598,14 +1593,13 @@ td::Status DelShardQuery::receive(td::BufferSlice data) {
|
|||
|
||||
td::Status AddCollatorQuery::run() {
|
||||
TRY_RESULT_ASSIGN(adnl_id_, tokenizer_.get_token<ton::PublicKeyHash>());
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status AddCollatorQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_addCollator>(
|
||||
adnl_id_.tl(), ton::create_tl_shard_id(ton::ShardIdFull(wc_, shard_)));
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_addCollator>(adnl_id_.tl(),
|
||||
ton::create_tl_shard_id(shard_));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
@ -1619,14 +1613,13 @@ td::Status AddCollatorQuery::receive(td::BufferSlice data) {
|
|||
|
||||
td::Status DelCollatorQuery::run() {
|
||||
TRY_RESULT_ASSIGN(adnl_id_, tokenizer_.get_token<ton::PublicKeyHash>());
|
||||
TRY_RESULT_ASSIGN(wc_, tokenizer_.get_token<td::int32>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<td::int64>());
|
||||
TRY_RESULT_ASSIGN(shard_, tokenizer_.get_token<ton::ShardIdFull>());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status DelCollatorQuery::send() {
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_delCollator>(
|
||||
adnl_id_.tl(), ton::create_tl_shard_id(ton::ShardIdFull(wc_, shard_)));
|
||||
auto b = ton::create_serialize_tl_object<ton::ton_api::engine_validator_delCollator>(adnl_id_.tl(),
|
||||
ton::create_tl_shard_id(shard_));
|
||||
td::actor::send_closure(console_, &ValidatorEngineConsole::envelope_send_query, std::move(b), create_promise());
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue