mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-04-02 06:45:17 +00:00
allow to replace sender's only txn in mempool
This commit is contained in:
parent
4c48f7ea63
commit
2c436a7d45
@ -258,7 +258,7 @@ func (mp *PriorityNonceMempool) Insert(ctx context.Context, tx sdk.Tx) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if indexSize > 1 {
|
||||
if indexSize > 0 {
|
||||
tail := index.Back()
|
||||
if tail != nil {
|
||||
tailKey := tail.Key().(txMeta)
|
||||
@ -291,8 +291,6 @@ func (mp *PriorityNonceMempool) Insert(ctx context.Context, tx sdk.Tx) error {
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// not found any index more than 1 except sender's index
|
||||
// We do not replace the sender's only tx in the mempool
|
||||
return errors.Wrapf(errMempoolIsFull, "%d@%s with priority%d", newKey.nonce, newKey.sender, newKey.priority)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user