1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix pass the selected neighbor to the download proof (#854)

* Fix pass the selected neighbor to the download proof.

* Fix GetNextKeyBlocks as well

Previously, the neighbor was choosed, but it was not passed to the DownloadProof class, as a result, in got_download_token we always get a random one from overlay, but after failure, bad statistics are recorded for the previously selected neighbor, which did not participate in this operation.
This commit is contained in:
Andrey Kravchenko 2024-01-10 16:27:06 +03:00 committed by GitHub
parent cf83bd1893
commit bc7ea2af2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -795,7 +795,7 @@ void FullNodeShardImpl::download_block_proof_link(BlockIdExt block_id, td::uint3
td::Promise<td::BufferSlice> promise) {
auto &b = choose_neighbour();
td::actor::create_actor<DownloadProof>("downloadproofreq", block_id, true, false, adnl_id_, overlay_id_,
adnl::AdnlNodeIdShort::zero(), priority, timeout, validator_manager_, rldp_,
b.adnl_id, priority, timeout, validator_manager_, rldp_,
overlays_, adnl_, client_, create_neighbour_promise(b, std::move(promise)))
.release();
}
@ -803,7 +803,7 @@ void FullNodeShardImpl::download_block_proof_link(BlockIdExt block_id, td::uint3
void FullNodeShardImpl::get_next_key_blocks(BlockIdExt block_id, td::Timestamp timeout,
td::Promise<std::vector<BlockIdExt>> promise) {
auto &b = choose_neighbour();
td::actor::create_actor<GetNextKeyBlocks>("next", block_id, 16, adnl_id_, overlay_id_, adnl::AdnlNodeIdShort::zero(),
td::actor::create_actor<GetNextKeyBlocks>("next", block_id, 16, adnl_id_, overlay_id_, b.adnl_id,
1, timeout, validator_manager_, rldp_, overlays_, adnl_, client_,
create_neighbour_promise(b, std::move(promise)))
.release();