use absolute

This commit is contained in:
Cassandra Heart 2024-11-27 00:29:55 -06:00
parent ab2484206d
commit ebc7474946
No known key found for this signature in database
GPG Key ID: 6352152859385958

View File

@ -6,6 +6,7 @@ import (
"crypto/rand"
"encoding/hex"
"fmt"
"math"
"math/big"
"math/bits"
"net"
@ -620,7 +621,7 @@ func (b *BlossomSub) refreshScores() {
}
pstats.score *= AppDecay
if pstats.score < .1 {
if math.Abs(pstats.score) < .1 {
pstats.score = 0
}
}