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:
		
							parent
							
								
									cf83bd1893
								
							
						
					
					
						commit
						bc7ea2af2d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue