mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	fix net/ unit tests for nodetable updates
This commit is contained in:
		
							parent
							
								
									3d98932c1e
								
							
						
					
					
						commit
						eb047148ff
					
				
							
								
								
									
										9
									
								
								net.cpp
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								net.cpp
									
									
									
									
									
								
							| @ -89,7 +89,16 @@ struct TestNodeTable: public NodeTable | |||||||
| 		bi::address ourIp = bi::address::from_string("127.0.0.1"); | 		bi::address ourIp = bi::address::from_string("127.0.0.1"); | ||||||
| 		for (auto& n: _testNodes) | 		for (auto& n: _testNodes) | ||||||
| 			if (_count--) | 			if (_count--) | ||||||
|  | 			{ | ||||||
|  | 				// manually add node for test
 | ||||||
|  | 				{ | ||||||
|  | 					Guard ln(x_nodes); | ||||||
|  | 					shared_ptr<NodeEntry> node(new NodeEntry(m_node, n.first.pub(), NodeIPEndpoint(bi::udp::endpoint(ourIp, n.second), bi::tcp::endpoint(ourIp, n.second)))); | ||||||
|  | 					node->pending = false; | ||||||
|  | 					m_nodes[node->id] = node; | ||||||
|  | 				} | ||||||
| 				noteActiveNode(n.first.pub(), bi::udp::endpoint(ourIp, n.second)); | 				noteActiveNode(n.first.pub(), bi::udp::endpoint(ourIp, n.second)); | ||||||
|  | 			} | ||||||
| 			else | 			else | ||||||
| 				break; | 				break; | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user