1
0
Fork 0
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:
ton 2019-09-14 18:14:55 +04:00
parent d8244eff53
commit 9d6853ef24
58 changed files with 1480 additions and 325 deletions

View file

@ -38,9 +38,9 @@ void RldpTransferSenderImpl::create_encoder() {
return;
}
td::BufferSlice D = data_.clone();
D.confirm_read(part_ * slice_size());
D.confirm_read(td::narrow_cast<std::size_t>(part_ * slice_size()));
if (D.size() > slice_size()) {
D.truncate(slice_size());
D.truncate(td::narrow_cast<std::size_t>(slice_size()));
}
fec_type_ = td::fec::RaptorQEncoder::Parameters{D.size(), symbol_size(), 0};
auto E = fec_type_.create_encoder(std::move(D));
@ -143,7 +143,7 @@ void RldpTransferReceiverImpl::receive_part(fec::FecType fec_type, td::uint32 pa
<< " data_size=" << data.data.size() << " part=" << part_));
return;
}
data_.as_slice().remove_prefix(offset_).copy_from(data.data.as_slice());
data_.as_slice().remove_prefix(td::narrow_cast<std::size_t>(offset_)).copy_from(data.data.as_slice());
offset_ += data.data.size();
auto obj = create_tl_object<ton_api::rldp_complete>(transfer_id_, part_);
td::actor::send_closure(adnl_, &adnl::Adnl::send_message, local_id_, peer_id_, serialize_tl_object(obj, true));