mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
liteclient signature check support
1. update liteclient/liteserver. Now liteserver sends signatures of blocks and liteclient checks them. I.e. liteclient completely checks received data. 2. validator-engine: more GC options 3. blockchain-explorer: show all block transactions (instead of 256) 4. some bugfixes
This commit is contained in:
parent
d8244eff53
commit
9d6853ef24
58 changed files with 1480 additions and 325 deletions
|
@ -395,8 +395,26 @@ void HttpQueryBlockInfo::got_transactions(td::BufferSlice data) {
|
|||
static_cast<ton::LogicalTime>(T->lt_), T->hash_);
|
||||
}
|
||||
|
||||
if (!--pending_queries_) {
|
||||
finish_query();
|
||||
if (f->incomplete_ && transactions_.size() > 0) {
|
||||
const auto &T = *transactions_.rbegin();
|
||||
auto query_3 = ton::serialize_tl_object(
|
||||
ton::create_tl_object<ton::lite_api::liteServer_listBlockTransactions>(
|
||||
ton::create_tl_lite_block_id(block_id_), 7 + 128, 1024,
|
||||
ton::create_tl_object<ton::lite_api::liteServer_transactionId3>(T.addr.addr, T.lt), false, false),
|
||||
true);
|
||||
auto P_3 = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<td::BufferSlice> R) {
|
||||
if (R.is_error()) {
|
||||
td::actor::send_closure(SelfId, &HttpQueryBlockInfo::abort_query, R.move_as_error_prefix("litequery failed: "));
|
||||
} else {
|
||||
td::actor::send_closure(SelfId, &HttpQueryBlockInfo::got_transactions, R.move_as_ok());
|
||||
}
|
||||
});
|
||||
td::actor::send_closure(CoreActorInterface::instance_actor_id(), &CoreActorInterface::send_lite_query,
|
||||
std::move(query_3), std::move(P_3));
|
||||
} else {
|
||||
if (!--pending_queries_) {
|
||||
finish_query();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -597,8 +615,27 @@ void HttpQueryBlockSearch::got_transactions(td::BufferSlice data) {
|
|||
static_cast<ton::LogicalTime>(T->lt_), T->hash_);
|
||||
}
|
||||
|
||||
if (!--pending_queries_) {
|
||||
finish_query();
|
||||
if (f->incomplete_ && transactions_.size() > 0) {
|
||||
const auto &T = *transactions_.rbegin();
|
||||
auto query_3 = ton::serialize_tl_object(
|
||||
ton::create_tl_object<ton::lite_api::liteServer_listBlockTransactions>(
|
||||
ton::create_tl_lite_block_id(block_id_), 7 + 128, 1024,
|
||||
ton::create_tl_object<ton::lite_api::liteServer_transactionId3>(T.addr.addr, T.lt), false, false),
|
||||
true);
|
||||
auto P_3 = td::PromiseCreator::lambda([SelfId = actor_id(this)](td::Result<td::BufferSlice> R) {
|
||||
if (R.is_error()) {
|
||||
td::actor::send_closure(SelfId, &HttpQueryBlockSearch::abort_query,
|
||||
R.move_as_error_prefix("litequery failed: "));
|
||||
} else {
|
||||
td::actor::send_closure(SelfId, &HttpQueryBlockSearch::got_transactions, R.move_as_ok());
|
||||
}
|
||||
});
|
||||
td::actor::send_closure(CoreActorInterface::instance_actor_id(), &CoreActorInterface::send_lite_query,
|
||||
std::move(query_3), std::move(P_3));
|
||||
} else {
|
||||
if (!--pending_queries_) {
|
||||
finish_query();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue