Module test_utils

Available on crate feature test-utils only.
Expand description

Common test helpers for mocking a pool Internal helpers for testing.

Structs§

MockFeeRange
The range of each type of fee, for the different transaction types
MockTransactionDistribution
A configured distribution that can generate transactions
MockTransactionFactory
A factory for creating and managing various types of mock transactions.
MockTransactionRatio
A ratio of each of the configured transaction types. The percentages sum up to 100, this is enforced in MockTransactionRatio::new by an assert.
MockTransactionSet
A set of MockTransactions that can be modified at once
TestPoolBuilder
Structure encapsulating a TestPool used for testing
TransactionBuilder
A Builder type to configure and create a transaction.
TransactionGenerator
A generator for transactions for testing purposes.

Enums§

MockTransaction
A Bare transaction type used for testing.
NonConflictingSetOutcome
Indicates whether or not the non-conflicting transaction set generated includes only blobs, or a mix of transaction types.

Functions§

mock_tx_pool
Create an empty TxPool
testing_pool
Returns a new Pool with default field values used for testing purposes

Type Aliases§

MockOrdering
MockOrdering is just a CoinbaseTipOrdering with MockTransaction
MockTxPool
A transaction pool implementation using MockOrdering for transaction ordering.
MockValidTx
A validated transaction in the transaction pool, using MockTransaction as the transaction type.
TestPool
A Pool used for testing