Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
_adjustment :: CommandLineOptions -> BehaviorAdjustmentcabal-debian Debian.Debianize.Optparse No documentation available.
-
cabal-debian Debian.Debianize.Optparse No documentation available.
catchJust_ :: HasCatch tag e m => Proxy# tag -> (e -> Maybe b) -> m a -> (b -> m a) -> m acapability Capability.Error For technical reasons, this method needs an extra proxy argument. You only need it if you are defining new instances of HasReader. Otherwise, you will want to use catchJust. See catchJust for more documentation.
-
cardano-coin-selection Cardano.CoinSelection.Fee Represents the set of possible failures that can occur when adjusting a CoinSelection with the adjustForFee function.
-
cardano-coin-selection Cardano.CoinSelection.Fee Adjusts the given CoinSelection in order to pay for a transaction fee, required in order to publish the selection as a transaction on a blockchain.
Background
Implementations of CoinSelectionAlgorithm generally produce coin selections that are exactly balanced, satisfying the following equality:>>> sumInputs s = sumOutputs s + sumChange s
In order to pay for a transaction fee, the above equality must be transformed into an inequality:>>> sumInputs s > sumOutputs s + sumChange s
The difference between these two sides represents value to be paid by the originator of the transaction, in the form of a fee:>>> sumInputs s = sumOutputs s + sumChange s + fee
The Adjustment Process
In order to generate a fee that is acceptable to the network, this function adjusts the change and inputs of the given CoinSelection, consulting the FeeEstimator as a guide for how much the current selection would cost to publish as a transaction on the network.Methods of Adjustment
There are two methods of adjustment possible:- The change set can be reduced, either by:a. completely removing a change value from the set; or byb. reducing a change value to a lower value.
- The inputs set can be augmented, by selecting additional inputs from the specified CoinMap argument.
Dealing with Dust Values
If, at any point, a change value is generated that is less than or equal to the DustThreshold, this function will eliminate that change value from the change set, redistributing the eliminated value over the remaining change values, ensuring that the total value of all change is preserved. See coalesceDust for more details.Termination
Since adjusting a selection can affect the fee estimate produced by estimateFee, the process of adjustment is an iterative process. The termination post-condition depends on the choice of FeeBalancingPolicy:- If RequireBalancedFee is specified, this function
terminates only when it has generated a CoinSelection
s that satisfies the following
property:
>>> sumInputs s = sumOutputs s + sumChange s + estimateFee s
- If RequireMinimalFee policy is specified, the above
equality is relaxed to the following
inequality:
>>> sumInputs s ≥ sumOutputs s + sumChange s + estimateFee s
-
conduit-algorithms Data.Conduit.Algorithms.Utils Act on the next input (do nothing if no input). awaitJust f is equivalent to
do next <- C.await case next of Just val -> f val Nothing -> return ()
This is a simple utility adapted from http://neilmitchell.blogspot.de/2015/07/thoughts-on-conduits.html adjustConsistency :: Consistency -> RetrySettings -> RetrySettingscql-io Database.CQL.IO On retry, change the consistency to the given value.
adjustResponseTimeout :: NominalDiffTime -> RetrySettings -> RetrySettingscql-io Database.CQL.IO On retry adjust the response timeout. See setResponseTimeout.
adjustSendTimeout :: NominalDiffTime -> RetrySettings -> RetrySettingscql-io Database.CQL.IO On retry adjust the send timeout. See setSendTimeout.
adjust :: Ord k => (a -> a) -> Interval k -> IntervalMap k a -> IntervalMap k adata-interval Data.IntervalMap.Lazy Update a value at a specific interval with the result of the provided function. When the interval does not overlatp with the map, the original map is returned.