feat(mempool): priority nonce mempool option with tx replacement (#14484)

Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
This commit is contained in:
JayT106
2023-01-10 23:45:48 +01:00
committed by GitHub
co-authored by Matt Kocubinski
parent c822836501
commit e6b849ade5
4 changed files with 82 additions and 7 deletions
+4 -1
View File
@@ -146,6 +146,9 @@ It is an integer value that sets the mempool in one of three modes, *bounded*, *
#### Callback
Allow to set a callback to be called when a transaction is read from the mempool.
The priority nonce mempool provides mempool options allowing the application sets callback(s).
* **OnRead**: Set a callback to be called when a transaction is read from the mempool.
* **TxReplacement**: Sets a callback to be called when duplicated transaction nonce detected during mempool insert. Application can define a transaction replacement rule based on tx priority or certain transaction fields.
More information on the SDK mempool implementation can be found in the [godocs](https://pkg.go.dev/github.com/cosmos/cosmos-sdk/types/mempool).