package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

doc/octez-shell-libs.validation/Tezos_validation/Protocol_plugin/No_plugin/Plugin/Conflict_map/index.html

Module Plugin.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.

Sourcetype t

Internal state needed by fee_needed_to_replace_by_fee.

Sourceval empty : t

Initial state.

Sourceval update : t -> new_operation:operation -> replacements:operation list -> t

Removes all the replacements from the state then adds new_operation.

Sourceval 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.

OCaml

Innovation. Community. Security.