package octez-shell-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-shell-libs.validation/Tezos_validation/Protocol_plugin/No_plugin/Plugin/Conflict_map/index.html
Module Plugin.Conflict_map
Source
The purpose of this module is to provide the fee_needed_to_replace_by_fee
function. For this function to be correct, the caller must maintain the state of type t
by calling update
on each successfully validated operation and its induced replacements.
Internal state needed by fee_needed_to_replace_by_fee
.
Removes all the replacements
from the state then adds new_operation
.
val fee_needed_to_replace_by_fee :
config ->
candidate_op:operation ->
conflict_map:t ->
int64 option
This function should be called when Mempool.add_operation
has returned Unchanged
. This means that the candidate_op
has been rejected because there was a conflict with an pre-existing operation and the conflict_handler
has returned `Keep
. This function returns the minimal fee (in mutez) that candidate_op
would need so that the conflict_handler
would return `Replace
instead. If no such fee exists, then the function returns None
.