mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-28 16:13:56 +00:00
30 lines
806 B
Go
30 lines
806 B
Go
package mempool
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
"github.com/kaspanet/kaspad/domain/consensus/utils/consensushashing"
|
|
)
|
|
|
|
type idToTransaction map[externalapi.DomainTransactionID]*mempoolTransaction
|
|
|
|
type mempoolTransaction struct {
|
|
transaction *externalapi.DomainTransaction
|
|
parentsInPool idToTransaction
|
|
isHighPriority bool
|
|
addAtDAAScore uint64
|
|
}
|
|
|
|
func (mt *mempoolTransaction) transactionID() *externalapi.DomainTransactionID {
|
|
return consensushashing.TransactionID(mt.transaction)
|
|
}
|
|
|
|
type orphanTransaction struct {
|
|
transaction *externalapi.DomainTransaction
|
|
isHighPriority bool
|
|
addedAtDAAScore uint64
|
|
}
|
|
|
|
func (ot *orphanTransaction) transactionID() *externalapi.DomainTransactionID {
|
|
return consensushashing.TransactionID(ot.transaction)
|
|
}
|