Versions in this module Expand all Collapse all v0 v0.24.3 Apr 24, 2024 Changes in this version + const DefaultBlockPrioritySize + const DefaultEstimateFeeMaxRollback + const DefaultEstimateFeeMinRegisteredBlocks + const DefaultMinRelayTxFee + const MaxRBFSequence + const MaxReplacementEvictions + var EstimateFeeDatabaseKey = []byte("estimatefee") + func CheckTransactionStandard(tx *btcutil.Tx, height int32, medianTimePast time.Time, ...) error + func DisableLog() + func ErrToRejectErr(err error) (wire.RejectCode, string) + func GetDustThreshold(txOut *wire.TxOut) int64 + func GetTxVirtualSize(tx *btcutil.Tx) int64 + func IsDust(txOut *wire.TxOut, minRelayTxFee btcutil.Amount) bool + func UseLogger(logger btclog.Logger) + type BtcPerKilobyte float64 + type Config struct + AddrIndex *indexers.AddrIndex + BestHeight func() int32 + CalcSequenceLock func(*btcutil.Tx, *blockchain.UtxoViewpoint) (*blockchain.SequenceLock, error) + ChainParams *chaincfg.Params + FeeEstimator *FeeEstimator + FetchUtxoView func(*btcutil.Tx) (*blockchain.UtxoViewpoint, error) + HashCache *txscript.HashCache + IsDeploymentActive func(deploymentID uint32) (bool, error) + MedianTimePast func() time.Time + Policy Policy + SigCache *txscript.SigCache + type FeeEstimator struct + func NewFeeEstimator(maxRollback, minRegisteredBlocks uint32) *FeeEstimator + func RestoreFeeEstimator(data FeeEstimatorState) (*FeeEstimator, error) + func (ef *FeeEstimator) EstimateFee(numBlocks uint32) (BtcPerKilobyte, error) + func (ef *FeeEstimator) LastKnownHeight() int32 + func (ef *FeeEstimator) ObserveTransaction(t *TxDesc) + func (ef *FeeEstimator) RegisterBlock(block *btcutil.Block) error + func (ef *FeeEstimator) Rollback(hash *chainhash.Hash) error + func (ef *FeeEstimator) Save() FeeEstimatorState + type FeeEstimatorState []byte + type MempoolAcceptResult struct + Conflicts map[chainhash.Hash]*btcutil.Tx + MissingParents []*chainhash.Hash + TxFee btcutil.Amount + TxSize int64 + type MockTxMempool struct + func (m *MockTxMempool) CheckMempoolAcceptance(tx *btcutil.Tx) (*MempoolAcceptResult, error) + func (m *MockTxMempool) CheckSpend(op wire.OutPoint) *btcutil.Tx + func (m *MockTxMempool) Count() int + func (m *MockTxMempool) FetchTransaction(txHash *chainhash.Hash) (*btcutil.Tx, error) + func (m *MockTxMempool) HaveTransaction(hash *chainhash.Hash) bool + func (m *MockTxMempool) LastUpdated() time.Time + func (m *MockTxMempool) ProcessTransaction(tx *btcutil.Tx, allowOrphan, rateLimit bool, tag Tag) ([]*TxDesc, error) + func (m *MockTxMempool) RawMempoolVerbose() map[string]... + func (m *MockTxMempool) RemoveTransaction(tx *btcutil.Tx, removeRedeemers bool) + func (m *MockTxMempool) TxDescs() []*TxDesc + type Policy struct + AcceptNonStd bool + DisableRelayPriority bool + FreeTxRelayLimit float64 + MaxOrphanTxSize int + MaxOrphanTxs int + MaxSigOpCostPerTx int + MaxTxVersion int32 + MinRelayTxFee btcutil.Amount + RejectReplacement bool + type RuleError struct + Err error + func (e RuleError) Error() string + type SatoshiPerByte float64 + func NewSatoshiPerByte(fee btcutil.Amount, size uint32) SatoshiPerByte + func (rate SatoshiPerByte) Fee(size uint32) btcutil.Amount + func (rate SatoshiPerByte) ToBtcPerKb() BtcPerKilobyte + type Tag uint64 + type TxDesc struct + StartingPriority float64 + type TxMempool interface + CheckMempoolAcceptance func(tx *btcutil.Tx) (*MempoolAcceptResult, error) + CheckSpend func(op wire.OutPoint) *btcutil.Tx + Count func() int + FetchTransaction func(txHash *chainhash.Hash) (*btcutil.Tx, error) + HaveTransaction func(hash *chainhash.Hash) bool + LastUpdated func() time.Time + ProcessTransaction func(tx *btcutil.Tx, allowOrphan, rateLimit bool, tag Tag) ([]*TxDesc, error) + RawMempoolVerbose func() map[string]*btcjson.GetRawMempoolVerboseResult + RemoveTransaction func(tx *btcutil.Tx, removeRedeemers bool) + TxDescs func() []*TxDesc + type TxPool struct + func New(cfg *Config) *TxPool + func (mp *TxPool) CheckMempoolAcceptance(tx *btcutil.Tx) (*MempoolAcceptResult, error) + func (mp *TxPool) CheckSpend(op wire.OutPoint) *btcutil.Tx + func (mp *TxPool) Count() int + func (mp *TxPool) FetchTransaction(txHash *chainhash.Hash) (*btcutil.Tx, error) + func (mp *TxPool) HaveTransaction(hash *chainhash.Hash) bool + func (mp *TxPool) IsOrphanInPool(hash *chainhash.Hash) bool + func (mp *TxPool) IsTransactionInPool(hash *chainhash.Hash) bool + func (mp *TxPool) LastUpdated() time.Time + func (mp *TxPool) MaybeAcceptTransaction(tx *btcutil.Tx, isNew, rateLimit bool) ([]*chainhash.Hash, *TxDesc, error) + func (mp *TxPool) MiningDescs() []*mining.TxDesc + func (mp *TxPool) ProcessOrphans(acceptedTx *btcutil.Tx) []*TxDesc + func (mp *TxPool) ProcessTransaction(tx *btcutil.Tx, allowOrphan, rateLimit bool, tag Tag) ([]*TxDesc, error) + func (mp *TxPool) RawMempoolVerbose() map[string]*btcjson.GetRawMempoolVerboseResult + func (mp *TxPool) RemoveDoubleSpends(tx *btcutil.Tx) + func (mp *TxPool) RemoveOrphan(tx *btcutil.Tx) + func (mp *TxPool) RemoveOrphansByTag(tag Tag) uint64 + func (mp *TxPool) RemoveTransaction(tx *btcutil.Tx, removeRedeemers bool) + func (mp *TxPool) TxDescs() []*TxDesc + func (mp *TxPool) TxHashes() []*chainhash.Hash + type TxRuleError struct + Description string + RejectCode wire.RejectCode + func (e TxRuleError) Error() string