package
1.9.6
Repository: https://github.com/decred/dcrd.git
Documentation: pkg.go.dev

# README

fees

Build Status ISC License Doc

Package fees provides decred-specific methods for tracking and estimating fee rates for new transactions to be mined into the network. Fee rate estimation has two main goals:

  • Ensuring transactions are mined within a target confirmation range (expressed in blocks);
  • Attempting to minimize fees while maintaining be above restriction.

This package was started in order to resolve issue decred/dcrd#1412 and related. See that issue for discussion of the selected approach.

License

Package dcrutil is licensed under the copyfree ISC License.

# Packages

No description provided by the author

# Functions

NewEstimator returns an empty estimator given a config.
UseLogger uses a specified Logger to output fee estimator logging info.

# Constants

DefaultFeeRateStep is the default multiplier between two consecutive fee rate buckets.
DefaultMaxBucketFeeMultiplier is the default multiplier used to find the largest fee bucket, starting at the minimum fee.
DefaultMaxConfirmations is the default number of confirmation ranges to track in the estimator.

# Variables

ErrNoSuccessPctBucketFound is the error returned when no bucket has been found with the minimum required percentage success.
ErrNotEnoughTxsForEstimate is the error returned when not enough transactions have been seen by the fee generator to give an estimate.

# Structs

ErrTargetConfTooLarge is the type of error returned when an user of the estimator requested a confirmation range higher than tracked by the estimator.
Estimator tracks historical data for published and mined transactions in order to estimate fees to be used in new transactions for confirmation within a target block window.
EstimatorConfig stores the configuration parameters for a given fee estimator.