Merge pull request #3261 from tendermint/anton/circle

Revert "quick fix for CircleCI (#2279)"
This commit is contained in:
Anton Kaliaev
2019-02-07 10:28:22 +04:00
committed by GitHub
22 changed files with 133 additions and 252 deletions
-9
View File
@@ -398,12 +398,3 @@ func BenchmarkSecretConnection(b *testing.B) {
}
//barSecConn.Close() race condition
}
func fingerprint(bz []byte) []byte {
const fbsize = 40
if len(bz) < fbsize {
return bz
} else {
return bz[:fbsize]
}
}
+1 -2
View File
@@ -616,10 +616,9 @@ func (of oldestFirst) Less(i, j int) bool { return of[i].LastAttempt.Before(of[j
// getPeersToCrawl returns addresses of potential peers that we wish to validate.
// NOTE: The status information is ordered as described above.
func (r *PEXReactor) getPeersToCrawl() []crawlPeerInfo {
var of oldestFirst
// TODO: be more selective
addrs := r.book.ListOfKnownAddresses()
of := make(oldestFirst, 0, len(addrs))
for _, addr := range addrs {
if len(addr.ID()) == 0 {
continue // dont use peers without id
+3 -5
View File
@@ -480,14 +480,12 @@ func (sw *Switch) acceptRoutine() {
metrics: sw.metrics,
})
if err != nil {
switch err.(type) {
switch err := err.(type) {
case ErrRejected:
rErr := err.(ErrRejected)
if rErr.IsSelf() {
if err.IsSelf() {
// Remove the given address from the address book and add to our addresses
// to avoid dialing in the future.
addr := rErr.Addr()
addr := err.Addr()
sw.addrBook.RemoveAddress(&addr)
sw.addrBook.AddOurAddress(&addr)
}
+1
View File
@@ -65,6 +65,7 @@ func TestTrustMetricCopyNilPointer(t *testing.T) {
}
// XXX: This test fails non-deterministically
//nolint:unused,deadcode
func _TestTrustMetricStopPause(t *testing.T) {
// The TestTicker will provide manual control over
// the passing of time within the metric