mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-29 00:23:14 +00:00
38 lines
1.4 KiB
Go
38 lines
1.4 KiB
Go
package mempool
|
|
|
|
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
|
|
type outpointToTransaction map[externalapi.DomainOutpoint]*mempoolTransaction
|
|
|
|
type transactionsByFeeHeap []*mempoolTransaction
|
|
|
|
type transactionsPool struct {
|
|
mempool *mempool
|
|
allTransactions idToTransaction
|
|
highPriorityTransactions idToTransaction
|
|
chainedTransactionsByPreviousOutpoint outpointToTransaction
|
|
transactionsByFeeRate transactionsByFeeHeap
|
|
}
|
|
|
|
func newTransactionsPool(mp *mempool) *transactionsPool {
|
|
return &transactionsPool{
|
|
mempool: mp,
|
|
allTransactions: idToTransaction{},
|
|
highPriorityTransactions: idToTransaction{},
|
|
chainedTransactionsByPreviousOutpoint: outpointToTransaction{},
|
|
transactionsByFeeRate: transactionsByFeeHeap{},
|
|
}
|
|
}
|
|
|
|
func (tp *transactionsPool) addTransaction(transaction *externalapi.DomainTransaction, parentsInPool []*mempoolTransaction) error {
|
|
panic("transactionsPool.addTransaction not implemented") // TODO (Mike)
|
|
}
|
|
|
|
func (tp *transactionsPool) addMempoolTransaction(transaction mempoolTransaction) error {
|
|
panic("transactionsPool.addMempoolTransaction not implemented") // TODO (Mike)
|
|
}
|
|
|
|
func (tp *transactionsPool) expireOldTransactions() error {
|
|
panic("transactionsPool.expireOldTransactions not implemented") // TODO (Mike)
|
|
}
|