Increase transaction pool default limits (#4792)

* increase limits, improve logging

* format in kB
This commit is contained in:
Nikolay Volf
2020-02-01 00:27:53 -08:00
committed by GitHub
parent adde404e41
commit 63ad759c69
3 changed files with 14 additions and 5 deletions
@@ -150,9 +150,16 @@ impl<B: ChainApi> ValidatedPool<B> {
let future_limit = &self.options.future;
debug!(target: "txpool", "Pool Status: {:?}", status);
if ready_limit.is_exceeded(status.ready, status.ready_bytes)
|| future_limit.is_exceeded(status.future, status.future_bytes) {
|| future_limit.is_exceeded(status.future, status.future_bytes)
{
debug!(
target: "txpool",
"Enforcing limits ({}/{}kB ready, {}/{}kB future",
ready_limit.count, ready_limit.total_bytes / 1024,
future_limit.count, future_limit.total_bytes / 1024,
);
// clean up the pool
let removed = {
let mut pool = self.pool.write();
@@ -163,6 +170,7 @@ impl<B: ChainApi> ValidatedPool<B> {
removed
};
// run notifications
debug!(target: "txpool", "Enforcing limits: {} dropped", removed.len());
let mut listener = self.listener.write();
for h in &removed {
listener.dropped(h, None);