mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 21:10:12 +00:00

* [NOD-1223] Delete unused files/packages. * [NOD-1223] Move signal and limits to the os package. * [NOD-1223] Put database and dbaccess into the db package. * [NOD-1223] Fold the logs package into the logger package. * [NOD-1223] Rename domainmessage to appmessage. * [NOD-1223] Rename to/from DomainMessage to AppMessage. * [NOD-1223] Move appmessage to the app packge. * [NOD-1223] Move protocol to the app packge. * [NOD-1223] Move the network package to the infrastructure packge. * [NOD-1223] Rename cmd to executables. * [NOD-1223] Fix go.doc in the logger package.
55 lines
1.8 KiB
Go
55 lines
1.8 KiB
Go
package blockdag
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/dagconfig"
|
|
"github.com/kaspanet/kaspad/domain/txscript"
|
|
"github.com/kaspanet/kaspad/infrastructure/db/dbaccess"
|
|
"github.com/kaspanet/kaspad/util/subnetworkid"
|
|
)
|
|
|
|
// Config is a descriptor which specifies the blockDAG instance configuration.
|
|
type Config struct {
|
|
// Interrupt specifies a channel the caller can close to signal that
|
|
// long running operations, such as catching up indexes or performing
|
|
// database migrations, should be interrupted.
|
|
//
|
|
// This field can be nil if the caller does not desire the behavior.
|
|
Interrupt <-chan struct{}
|
|
|
|
// DAGParams identifies which DAG parameters the DAG is associated
|
|
// with.
|
|
//
|
|
// This field is required.
|
|
DAGParams *dagconfig.Params
|
|
|
|
// TimeSource defines the time source to use for things such as
|
|
// block processing and determining whether or not the DAG is current.
|
|
TimeSource TimeSource
|
|
|
|
// SigCache defines a signature cache to use when when validating
|
|
// signatures. This is typically most useful when individual
|
|
// transactions are already being validated prior to their inclusion in
|
|
// a block such as what is usually done via a transaction memory pool.
|
|
//
|
|
// This field can be nil if the caller is not interested in using a
|
|
// signature cache.
|
|
SigCache *txscript.SigCache
|
|
|
|
// IndexManager defines an index manager to use when initializing the
|
|
// DAG and connecting blocks.
|
|
//
|
|
// This field can be nil if the caller does not wish to make use of an
|
|
// index manager.
|
|
IndexManager IndexManager
|
|
|
|
// SubnetworkID identifies which subnetwork the DAG is associated
|
|
// with.
|
|
//
|
|
// This field is required.
|
|
SubnetworkID *subnetworkid.SubnetworkID
|
|
|
|
// DatabaseContext is the context in which all database queries related to
|
|
// this DAG are going to run.
|
|
DatabaseContext *dbaccess.DatabaseContext
|
|
}
|