Skip to content

Guard mempool drop percentage config#444

Open
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-mempool-drop-percentage-guard
Open

Guard mempool drop percentage config#444
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-mempool-drop-percentage-guard

Conversation

@giwaov

@giwaov giwaov commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Normalize non-positive mempool drop percentages to the default value.
  • Apply the same guard inside the internal drop helper.
  • Add regression coverage for negative drop percentage eviction.

Why

A negative drop percentage could make mempool eviction calculate a zero or invalid drop count when transaction limits are reached. That can leave the eviction loop unable to make progress or cause invalid slicing.

Testing

  • git diff --check
  • Not run: Go toolchain is not installed in this environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant