apply to set early

This commit is contained in:
Cassandra Heart 2024-11-26 21:02:08 -06:00
parent 75716be4fa
commit 6fba1a3cd9
No known key found for this signature in database
GPG Key ID: 6352152859385958

View File

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