mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-28 08:11:08 +00:00
Invert the condition for banning when mempool rejects a transaction
This commit is contained in:
parent
c099fd2986
commit
71875c99d6
@ -180,10 +180,10 @@ func (flow *handleRelayedTransactionsFlow) receiveTransactions(requestedTransact
|
||||
return errors.Wrapf(err, "failed to process transaction %s", txID)
|
||||
}
|
||||
|
||||
shouldBan := true
|
||||
shouldBan := false
|
||||
if txRuleErr := (&mempool_old.TxRuleError{}); errors.As(ruleErr.Err, txRuleErr) {
|
||||
if txRuleErr.RejectCode != mempool_old.RejectInvalid {
|
||||
shouldBan = false
|
||||
if txRuleErr.RejectCode == mempool_old.RejectInvalid {
|
||||
shouldBan = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user