package
Version:
v0.3.10
Opens a new window with list of versions in this module.
Published: Apr 11, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CalCpfp 计算CPFP
必须参数 txID, desiredFeeRate 分别为目标txId以及目标的综合gas费
可选参数 childTxSizeVb 下一个交易的预估vb(虚拟大小=weight/4)
当 childTxSizeVb=0 时,此时操作视为rbf替换txID 对应的交易,所以计算的是当前txId对应的交易的新的feeRate
当 childTxSizeVb!=0时,此时操作视为为一个新的交易
type Ancestor struct {
Txid string `json:"txid"`
Fee int `json:"fee"`
Weight int `json:"weight"`
}
type ResponseData struct {
Error string `json:"error"`
Ancestors []Ancestor `json:"ancestors"`
Descendants []Ancestor `json:"descendants"`
EffectiveFeePerVsize float64 `json:"effectiveFeePerVsize"`
AdjustedVsize float64 `json:"adjustedVsize"`
}
type Status struct {
Confirmed bool `json:"confirmed"`
}
type TransactionDetail struct {
Txid string `json:"txid"`
Weight int `json:"weight"`
Fee int `json:"fee"`
Status Status `json:"status"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.