don't set within validator

This commit is contained in:
Cassandra Heart 2024-11-26 22:52:22 -06:00
parent 7b2de084fd
commit 70b30ddde1
No known key found for this signature in database
GPG Key ID: 6352152859385958

View File

@ -83,10 +83,9 @@ func (e *DataClockConsensusEngine) validateTxMessage(peerID peer.ID, message *pb
frameNumber,
mint.Signature.PublicKey.KeyValue,
)
e.stagedTransactionsMx.Lock()
e.stagedTransactionsMx.RLock()
_, ok := e.stagedTransactionsSet[id]
e.stagedTransactionsSet[id] = struct{}{}
e.stagedTransactionsMx.Unlock()
e.stagedTransactionsMx.RUnlock()
if ok {
e.pubSub.AddPeerScore([]byte(peerID), -1000000)
return p2p.ValidationResultReject