mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-07 00:26:58 +00:00
Merge pull request #3261 from tendermint/anton/circle
Revert "quick fix for CircleCI (#2279)"
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user