package octez-protocol-020-PsParisC-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-protocol-020-PsParisC-libs.plugin/Tezos_protocol_plugin_020_PsParisC/Mempool/Conflict_map/index.html
Module Mempool.Conflict_mapSource
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.
val update :
t ->
new_operation:
Tezos_protocol_020_PsParisC.Protocol.Alpha_context.packed_operation ->
replacements:
Tezos_protocol_020_PsParisC.Protocol.Alpha_context.packed_operation list ->
tRemoves all the replacements from the state then adds new_operation.
val fee_needed_to_replace_by_fee :
config ->
candidate_op:
Tezos_protocol_020_PsParisC.Protocol.Alpha_context.packed_operation ->
conflict_map:t ->
int64 optionThis function should be called when Protocol.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. When both operations are manager operations, this function returns the minimal fee (in mutez) that candidate_op would need in order to win the conflict, i.e. make the conflict_handler return `Replace instead. Otherwise, it returns None.