dusts

package
v1.0.42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DustFee

type DustFee struct {
	SoftDustSize btcutil.Amount // Soft dust threshold (between hard and soft limits) // 软灰尘限制(介于硬灰尘和软灰尘之间的数量)
	ExtraDustFee btcutil.Amount // Extra fee per soft dust output // 单个软灰尘额外的收费
}

DustFee represents soft dust fee configuration Defines threshold and extra fee charged for soft dust outputs

DustFee 代表软灰尘费用配置 定义软灰尘输出的阈值和额外收费

func NewDustFee

func NewDustFee() DustFee

NewDustFee creates DustFee with default zero configuration Returns DustFee instance with soft dust disabled

NewDustFee 创建使用默认零值配置的 DustFee 返回禁用软灰尘的 DustFee 实例

func (*DustFee) CountDustOutput

func (D *DustFee) CountDustOutput(outputs []*wire.TxOut) int64

CountDustOutput counts number of outputs below soft dust threshold Returns zero if soft dust size is not configured

CountDustOutput 计算低于软灰尘阈值的输出数量 如果未配置软灰尘大小则返回零

func (*DustFee) SumExtraDustFee

func (D *DustFee) SumExtraDustFee(outputs []*wire.TxOut) btcutil.Amount

SumExtraDustFee calculates total extra fee based on soft dust outputs Returns fee amount by multiplying dust count with extra fee rate

SumExtraDustFee 根据软灰尘输出计算总额外费用 通过灰尘数量乘以额外费率返回费用数量

type DustLimit

type DustLimit struct {
	// contains filtered or unexported fields
}

DustLimit represents dust output detection checker with custom validation logic Provides flexible dust detection through configurable check function

DustLimit 代表使用自定义验证逻辑的灰尘输出检测检查器 通过可配置的检查函数提供灵活的灰尘检测

func NewDustLimit

func NewDustLimit(check func(output *wire.TxOut, relayFeePerKb btcutil.Amount) bool) *DustLimit

NewDustLimit creates DustLimit with custom check function Accepts function that determines dust status based on output and fee rate

NewDustLimit 使用自定义检查函数创建 DustLimit 接受根据输出和费率确定灰尘状态的函数

func (*DustLimit) IsDustOutput

func (D *DustLimit) IsDustOutput(output *wire.TxOut, relayFeePerKb btcutil.Amount) bool

IsDustOutput checks if transaction output qualifies as dust Uses configured check function to determine dust status

IsDustOutput 检查交易输出是否符合灰尘条件 使用配置的检查函数确定灰尘状态

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL