From ebc7474946492b283657c1425922ca05e6614aa4 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Wed, 27 Nov 2024 00:29:55 -0600 Subject: [PATCH] use absolute --- node/p2p/blossomsub.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/p2p/blossomsub.go b/node/p2p/blossomsub.go index dc955da..c1848b4 100644 --- a/node/p2p/blossomsub.go +++ b/node/p2p/blossomsub.go @@ -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 } }