Merge branch 'master' into v5

This commit is contained in:
loyalsoldier
2021-04-13 14:19:02 +08:00
49 changed files with 986 additions and 11782 deletions
+13
View File
@@ -40,6 +40,8 @@ type TimedUserValidator struct {
behaviorFused bool
aeadDecoderHolder *aead.AuthIDDecoderHolder
legacyWarnShown bool
}
type indexTimePair struct {
@@ -245,6 +247,17 @@ func (v *TimedUserValidator) BurnTaintFuse(userHash []byte) error {
return ErrNotFound
}
/* ShouldShowLegacyWarn will return whether a Legacy Warning should be shown
Not guaranteed to only return true once for every inbound, but it is okay.
*/
func (v *TimedUserValidator) ShouldShowLegacyWarn() bool {
if v.legacyWarnShown {
return false
}
v.legacyWarnShown = true
return true
}
var ErrNotFound = newError("Not Found")
var ErrTainted = newError("ErrTainted")