// isBad returns true if the address in question has not been tried in the last
// minute and meets one of the following criteria:
// 1) It claims to be from the future
// 2) It hasn't been seen in over a month
// 3) It has failed at least three times and never succeeded
// 4) It has failed ten times in the last week
// All addresses that meet these criteria are assumed to be worthless and not
// worth keeping hold of.
isBad returns true if the address in question has not been tried in the last
minute and meets one of the following criteria:
1) It claims to be from the future
2) It hasn't been seen in over a month
3) It has failed at least three times and never succeeded
4) It has failed ten times in the last week
All addresses that meet these criteria are assumed to be worthless and not
worth keeping hold of.
// isBad returns true if the address in question has not been tried in the last // minute and meets one of the following criteria : // 1 ) It claims to be from the future // 2 ) It hasn ' t been seen in over a month // 3 ) It has failed at least three times and never succeeded // 4 ) It has failed ten times in the last week // All addresses that meet these criteria are assumed to be worthless and not // worth keeping hold of .
func (ka *KnownAddress) isBad() bool {
	if ka.lastattempt.After(time.Now().Add(-1 * time.Minute)) {
		return false
	}
	if ka.na.Timestamp.After(time.Now().Add(10 * time.Minute)) {
		return true
	}
	if ka.na.Timestamp.Before(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {
		return true
	}
	if ka.lastsuccess.IsZero() && ka.attempts >= numRetries {
		return true
	}
	if !ka.lastsuccess.After(time.Now().Add(-1*minBadDays*time.Hour*24)) &&
		ka.attempts >= maxFailures {
		return true
	}
	return false
}
func ( ka * KnownAddress ) isBad ( ) bool { if ka . lastattempt . After ( time . Now ( ) . Add ( - 1 * time . Minute ) ) { return false } if ka . na . Timestamp . After ( time . Now ( ) . Add ( 10 * time . Minute ) ) { return true } if ka . na . Timestamp . Before ( time . Now ( ) . Add ( - 1 * numMissingDays * time . Hour * 24 ) ) { return true } if ka . lastsuccess . IsZero ( ) && ka . attempts >= numRetries { return true } if ! ka . lastsuccess . After ( time . Now ( ) . Add ( - 1 * minBadDays * time . Hour * 24 ) ) && ka . attempts >= maxFailures { return true } return false }
isBad returns true if the address in question has not been tried in the last
minute and meets one of the following criteria:
1) It claims to be from the future
2) It hasn't been seen in over a month
3) It has failed at least three times and never succeeded
4) It has failed ten times in the last week
All addresses that meet these criteria are assumed to be worthless and not
worth keeping hold of.
isBad returns true if the address in question has not been tried in the last minute and meets one of the following criteria : 1 ) It claims to be from the future 2 ) It hasn ' t been seen in over a month 3 ) It has failed at least three times and never succeeded 4 ) It has failed ten times in the last week All addresses that meet these criteria are assumed to be worthless and not worth keeping hold of .
// From the future? // Over a month old? // Never succeeded? // Hasn't succeeded in too long?