Compare commits

..

1 Commits

Author SHA1 Message Date
Ori Newman
a12f86efc2 Reject from mempool 2023-09-25 07:22:38 +03:00
2 changed files with 1 additions and 2 deletions

View File

@@ -51,7 +51,6 @@ const (
RejectDifficulty RejectCode = 0x44
RejectImmatureSpend RejectCode = 0x45
RejectBadOrphan RejectCode = 0x64
RejectSpamTx RejectCode = 0x65
)
// Map of reject codes back strings for pretty printing.

View File

@@ -33,7 +33,7 @@ func (mp *mempool) validateAndInsertTransaction(transaction *externalapi.DomainT
numExtraOuts := len(transaction.Outputs) - len(transaction.Inputs)
if numExtraOuts > 2 && transaction.Fee < uint64(numExtraOuts)*constants.SompiPerKaspa {
log.Warnf("Rejected spam tx %s from mempool", consensushashing.TransactionID(transaction))
return nil, transactionRuleError(RejectSpamTx, fmt.Sprintf("Rejected spam tx %s from mempool", consensushashing.TransactionID(transaction)))
return nil, nil
}
if len(missingOutpoints) > 0 {