In the v0.34 line, the socket and gRPC clients require explicit flushes to
ensure that the client and server have received an async request. Add these
calls explicitly where required in the backport of the priority mempool.
In addition, the gRPC client's flush plumbing was not fully hooked up in the
v0.34 line, so this change includes that update as well.
This is a manual cherry-pick of commit b94470a6a4.
In the original implementation transactions evicted for priority were also
removed from the cache. In addition, remove expired transactions from the
cache.
Related:
- Add Has method to cache implementations.
- Update tests to exercise this condition.
A manual backport of #8984.
This case is symmetric to what we did for CheckTx calls, where we release the
mempool mutex to ensure callbacks can fire during call setup. We also need
this behaviour for application flush, for the same reason: The caller holds the
lock by contract from the Mempool interface.
A manual cherry-pick of 9e64c95.
The way this was originally structured, we reacquired the lock after issuing
the initial ABCI CheckTx call, only to immediately release it. Restructure the
code so that this redundant acquire is no longer necessary.
- Remove warning log for issue #8775.
- Fix call to FlushAsync (no error is reported).
- Don't log on rechecks, it's the default (manual backport of #8969).
This is a manual backport of the changes from these commits:
- bc49f66 Add more unit tests for the priority mempool. (#8961)
- 9b02094 Fix unbounded heap growth in the priority mempool. (#8944)
Imports and type signatures have been updated to match the v0.34 usage.