Versions in this module Expand all Collapse all v0 v0.12.2 Mar 18, 2021 Changes in this version + const DefaultMaxUpdates + const DefaultRewardRate + const DefaultSweepFeeRate + const MinSweepFeeRate + const RewardScale + var ErrAltruistReward = errors.New("altruist policy has reward params") + var ErrCreatesDust = errors.New("justice transaction creates dust at fee rate") + var ErrFeeExceedsInputs = errors.New("sweep fee exceeds input value") + var ErrNoMaxUpdates = errors.New("max updates must be positive") + var ErrRewardExceedsInputs = errors.New("reward amount exceeds input value") + var ErrSweepFeeRateTooLow = errors.New("sweep fee rate too low") + func ComputeRewardAmount(total vclutil.Amount, base, rate uint32) vclutil.Amount + type Policy struct + MaxUpdates uint16 + func DefaultPolicy() Policy + func (p *Policy) ComputeAltruistOutput(totalAmt vclutil.Amount, txWeight int64) (vclutil.Amount, error) + func (p *Policy) ComputeJusticeTxOuts(totalAmt vclutil.Amount, txWeight int64, sweepPkScript, rewardPkScript []byte) ([]*wire.TxOut, error) + func (p *Policy) ComputeRewardOutputs(totalAmt vclutil.Amount, txWeight int64) (vclutil.Amount, vclutil.Amount, error) + func (p Policy) IsAnchorChannel() bool + func (p Policy) String() string + func (p Policy) Validate() error + type TxPolicy struct + BlobType blob.Type + RewardBase uint32 + RewardRate uint32 + SweepFeeRate chainfee.SatPerKWeight