Skip to content

Commit

Permalink
simplify check
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Jul 8, 2024
1 parent f16f4f2 commit 303441e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mixing/mixpool/mixpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ func (p *Pool) checkAcceptKE(ke *wire.MsgMixKeyExchange) error {

now := time.Now()
keEpoch := time.Unix(int64(ke.Epoch), 0)
if now.Before(keEpoch) && keEpoch.Sub(now) > earlyKEDuration {
if now.Add(earlyKEDuration).Before(keEpoch) {
err := fmt.Errorf("KE received too early for stated epoch")
return ruleError(err)
}
Expand Down

0 comments on commit 303441e

Please sign in to comment.