Documentation
¶
Index ¶
- type Config
- type ConfigError
- type FeeConfig
- type InvalidFeeError
- type MockTxPool
- func (m *MockTxPool) AllPendingTxs() []*tx.Tx
- func (m *MockTxPool) AppendTx(trx *tx.Tx) error
- func (m *MockTxPool) AppendTxAndBroadcast(trx *tx.Tx) error
- func (*MockTxPool) EstimatedFee(_ amount.Amount, _ payload.Type) amount.Amount
- func (*MockTxPool) HandleCommittedBlock(_ *block.Block)
- func (m *MockTxPool) HasTx(txID tx.ID) bool
- func (m *MockTxPool) PendingTx(txID tx.ID) *tx.Tx
- func (m *MockTxPool) PrepareBlockTransactions() block.Txs
- func (m *MockTxPool) QueryTx(txID tx.ID) *tx.Tx
- func (m *MockTxPool) RemoveTx(id hash.Hash)
- func (*MockTxPool) SetNewSandboxAndRecheck(_ sandbox.Sandbox)
- func (m *MockTxPool) Size() int
- func (*MockTxPool) String() string
- type Reader
- type TxPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxSize int `toml:"max_size"` Fee *FeeConfig `toml:"fee"` // Private configs ConsumptionWindow uint32 `toml:"-"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) BasicCheck ¶ added in v0.15.0
BasicCheck performs basic checks on the configuration.
type ConfigError ¶ added in v1.1.0
type ConfigError struct {
Reason string
}
ConfigError is returned when the txPool configuration is invalid.
func (ConfigError) Error ¶ added in v1.1.0
func (e ConfigError) Error() string
type FeeConfig ¶ added in v1.6.0
type FeeConfig struct { FixedFee float64 `toml:"fixed_fee"` DailyLimit int `toml:"daily_limit"` UnitPrice float64 `toml:"unit_price"` }
func DefaultFeeConfig ¶ added in v1.6.0
func DefaultFeeConfig() *FeeConfig
type InvalidFeeError ¶ added in v1.6.0
InvalidFeeError indicates that the transaction fee is below the minimum required.
func (InvalidFeeError) Error ¶ added in v1.6.0
func (e InvalidFeeError) Error() string
type MockTxPool ¶
MockTxPool is a testing mock.
func MockingTxPool ¶
func MockingTxPool() *MockTxPool
func (*MockTxPool) AllPendingTxs ¶ added in v1.3.0
func (m *MockTxPool) AllPendingTxs() []*tx.Tx
func (*MockTxPool) AppendTxAndBroadcast ¶
func (m *MockTxPool) AppendTxAndBroadcast(trx *tx.Tx) error
func (*MockTxPool) EstimatedFee ¶ added in v1.1.6
func (*MockTxPool) HandleCommittedBlock ¶ added in v1.6.0
func (*MockTxPool) HandleCommittedBlock(_ *block.Block)
func (*MockTxPool) PrepareBlockTransactions ¶
func (m *MockTxPool) PrepareBlockTransactions() block.Txs
func (*MockTxPool) RemoveTx ¶
func (m *MockTxPool) RemoveTx(id hash.Hash)
func (*MockTxPool) SetNewSandboxAndRecheck ¶
func (*MockTxPool) SetNewSandboxAndRecheck(_ sandbox.Sandbox)
func (*MockTxPool) Size ¶
func (m *MockTxPool) Size() int
func (*MockTxPool) String ¶ added in v0.15.0
func (*MockTxPool) String() string
type TxPool ¶
type TxPool interface { Reader SetNewSandboxAndRecheck(sbx sandbox.Sandbox) AppendTxAndBroadcast(trx *tx.Tx) error AppendTx(trx *tx.Tx) error HandleCommittedBlock(blk *block.Block) }
Click to show internal directories.
Click to hide internal directories.