storj/satellite
Cameron 4058c29ca4
filter duplicate node IPs (#1890)
* add last_ip field to dbx model node, generate dbx

* add last_ip to node proto, generate pb

* migrate

* resolve address in transport.DialNode, update lastIp in cache.UpdateAddress

* use net.SplitHostPort to isolate host address from port

* define DistinctIPs flag

* add test for GetIP

* select last_ip when querying for nodes

* if distinctIPs flag == true, query for nodes with distinct IPs

* some basic tests

* change last_ip to field 14 in proto

* remove comments

* check err

* change distinctIPs to distinctIP

* exclude IPs from newNodes in query for reputable nodes

* add index on last_ip

* only add to excludedIPs if flag is true

* test half new nodes returns distinct IPs

* fix alignment

* add test

* rework ip filter query, add retry logic, add switch for database driver

* add retry to SelectNewNodes

* change discovery intervals so IPs don't get overwritten

* remove TestGetIP

* edit updating node stats in test

* split exclude into nodeIDs and IPs

* separate non-distinct IP query into other function

* trigger checks

* remove else block
2019-05-22 16:06:27 -04:00
..
console satellite/console: use require.NoError in tests (#1986) 2019-05-17 09:31:14 -04:00
inspector moved invalid/offline back into SQL (#1838) 2019-05-01 09:45:52 -04:00
mailservice satellite/mailservice: wait for goroutines to finish (#1985) 2019-05-17 14:29:35 +02:00
metainfo Bt/repair no nodes (#1974) 2019-05-17 15:02:40 -04:00
orders wired up IsHealthy to config (#1820) 2019-04-23 18:45:50 -04:00
satellitedb filter duplicate node IPs (#1890) 2019-05-22 16:06:27 -04:00
peer.go adds db layer functions for containment (#1972) 2019-05-22 10:50:22 -04:00