mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-20 22:06:42 +00:00

* Add the mempool size to getInfo RPC command * Add mempool.Len() * Rename mempool.Len() to mempool.TransactionCount() Co-authored-by: Svarog <feanorr@gmail.com>
18 lines
822 B
Go
18 lines
822 B
Go
package model
|
|
|
|
import (
|
|
consensusexternalapi "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// Mempool maintains a set of known transactions that
|
|
// are intended to be mined into new blocks
|
|
type Mempool interface {
|
|
HandleNewBlockTransactions(txs []*consensusexternalapi.DomainTransaction) ([]*consensusexternalapi.DomainTransaction, error)
|
|
BlockCandidateTransactions() []*consensusexternalapi.DomainTransaction
|
|
ValidateAndInsertTransaction(transaction *consensusexternalapi.DomainTransaction, allowOrphan bool) error
|
|
RemoveTransactions(txs []*consensusexternalapi.DomainTransaction) error
|
|
GetTransaction(transactionID *consensusexternalapi.DomainTransactionID) (*consensusexternalapi.DomainTransaction, bool)
|
|
AllTransactions() []*consensusexternalapi.DomainTransaction
|
|
TransactionCount() int
|
|
}
|