[go: up one dir, main page]

Mempool plugins&shell: add fee_needed_to_replace_by_fee

Context

This MR provides the fee_needed_to_replace_by_fee plugin function. It returns the minimal fee that a given manager operation would need to be be allowed by the conflict_handler to replace another given operation. It is therefore similar to the fee_needed_to_overtake function introduced in !8573 (merged), except that it is interested in the conflict_handler (which depends on config.replace_by_fee_factor) instead of the protocol's Operation.compare.

This function will be useful to indicate, inside an operation conflict error, the fee that an operation would need to win said conflict. As such, this MR contributes to #5197 (closed).

Depends on !8573 (merged).

Manually testing the MR

dune exec src/proto_alpha/lib_plugin/test/main.exe

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • n/a Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • n/a For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Diane Gallois-Wong

Merge request reports

Loading