mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-25 00:06:49 +00:00

* [NOD-1488] Get rid of dbaccess * [NOD-1488] Rename dbwrapper to dbmanager * [NOD-1488] Create DBWriter interface * [NOD-1488] Fix block header store * [NOD-1488] Rename dbwrapper.go to dbmanager.go
27 lines
899 B
Go
27 lines
899 B
Go
package transactionvalidator
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
)
|
|
|
|
// transactionValidator exposes a set of validation classes, after which
|
|
// it's possible to determine whether either a transaction is valid
|
|
type transactionValidator struct {
|
|
blockCoinbaseMaturity uint64
|
|
databaseContext model.DBReader
|
|
pastMedianTimeManager model.PastMedianTimeManager
|
|
ghostdagDataStore model.GHOSTDAGDataStore
|
|
}
|
|
|
|
// New instantiates a new TransactionValidator
|
|
func New(blockCoinbaseMaturity uint64,
|
|
databaseContext model.DBReader,
|
|
pastMedianTimeManager model.PastMedianTimeManager,
|
|
ghostdagDataStore model.GHOSTDAGDataStore) model.TransactionValidator {
|
|
return &transactionValidator{blockCoinbaseMaturity: blockCoinbaseMaturity,
|
|
databaseContext: databaseContext,
|
|
pastMedianTimeManager: pastMedianTimeManager,
|
|
ghostdagDataStore: ghostdagDataStore,
|
|
}
|
|
}
|