Documentation ¶
Index ¶
Constants ¶
const ( // MaximumStandardTransactionMass is the maximum mass allowed for transactions that // are considered standard and will therefore be relayed and considered for mining. MaximumStandardTransactionMass = 100_000 )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(config *Config, consensusReference consensusreference.ConsensusReference) miningmanagermodel.Mempool
New constructs a new mempool
Types ¶
type Config ¶
type Config struct { MaximumTransactionCount uint64 TransactionExpireIntervalDAAScore uint64 TransactionExpireScanIntervalDAAScore uint64 TransactionExpireScanIntervalSeconds uint64 OrphanExpireIntervalDAAScore uint64 OrphanExpireScanIntervalDAAScore uint64 MaximumOrphanTransactionMass uint64 MaximumOrphanTransactionCount uint64 AcceptNonStandard bool MaximumMassPerBlock uint64 MinimumRelayTransactionFee util.Amount MinimumStandardTransactionVersion uint16 MaximumStandardTransactionVersion uint16 }
Config represents a mempool configuration
func DefaultConfig ¶
DefaultConfig returns the default mempool configuration
type RejectCode ¶
type RejectCode uint8
RejectCode represents a numeric value by which a remote peer indicates why a message was rejected.
const ( RejectMalformed RejectCode = 0x01 RejectInvalid RejectCode = 0x10 RejectObsolete RejectCode = 0x11 RejectDuplicate RejectCode = 0x12 RejectNotRequested RejectCode = 0x13 RejectNonstandard RejectCode = 0x40 RejectDust RejectCode = 0x41 RejectInsufficientFee RejectCode = 0x42 RejectFinality RejectCode = 0x43 RejectDifficulty RejectCode = 0x44 RejectImmatureSpend RejectCode = 0x45 RejectBadOrphan RejectCode = 0x64 RejectSpamTx RejectCode = 0x65 )
These constants define the various supported reject codes.
func (RejectCode) String ¶
func (code RejectCode) String() string
String returns the RejectCode in human-readable form.
type RuleError ¶
type RuleError struct {
Err error
}
RuleError identifies a rule violation. It is used to indicate that processing of a transaction failed due to one of the many validation rules. The caller can use type assertions to determine if a failure was specifically due to a rule violation and use the Err field to access the underlying error, which will be either a TxRuleError or a ruleerrors.RuleError.
type TxRuleError ¶
type TxRuleError struct { RejectCode RejectCode // The code to send with reject messages Description string // Human readable description of the issue }
TxRuleError identifies a rule violation. It is used to indicate that processing of a transaction failed due to one of the many validation rules. The caller can use type assertions to determine if a failure was specifically due to a rule violation and access the ErrorCode field to ascertain the specific reason for the rule violation.
func (TxRuleError) Error ¶
func (e TxRuleError) Error() string
Error satisfies the error interface and prints human-readable errors.
Source Files ¶
- check_transaction_standard.go
- config.go
- error.go
- fill_inputs_and_get_missing_parents.go
- handle_new_block_transactions.go
- log.go
- mempool.go
- mempool_utxo_set.go
- orphan_pool.go
- remove_transaction.go
- revalidate_high_priority_transactions.go
- transactions_pool.go
- validate_and_insert_transaction.go
- validate_transaction.go