Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { dagconfig.Params // IsArchival tells the consensus if it should not prune old blocks IsArchival bool // EnableSanityCheckPruningUTXOSet checks the full pruning point utxo set against the commitment at every pruning movement EnableSanityCheckPruningUTXOSet bool SkipAddingGenesis bool }
Config is the full config required to run consensus
type DifficultyManagerConstructor ¶
type DifficultyManagerConstructor func(model.DBReader, model.GHOSTDAGManager, model.GHOSTDAGDataStore, model.BlockHeaderStore, model.DAABlocksStore, model.DAGTopologyManager, model.DAGTraversalManager, *big.Int, int, bool, time.Duration, *externalapi.DomainHash, uint32) model.DifficultyManager
DifficultyManagerConstructor is the function signature for a constructor of a type implementing model.DifficultyManager
type Factory ¶
type Factory interface { NewConsensus(config *Config, db infrastructuredatabase.Database, dbPrefix *prefix.Prefix, consensusEventsChan chan externalapi.ConsensusEvent) ( externalapi.Consensus, bool, error) NewTestConsensus(config *Config, testName string) ( tc testapi.TestConsensus, teardown func(keepDataDir bool), err error) SetTestDataDir(dataDir string) SetTestGHOSTDAGManager(ghostdagConstructor GHOSTDAGManagerConstructor) SetTestLevelDBCacheSize(cacheSizeMiB int) SetTestPreAllocateCache(preallocateCaches bool) SetTestPastMedianTimeManager(medianTimeConstructor PastMedianTimeManagerConstructor) SetTestDifficultyManager(difficultyConstructor DifficultyManagerConstructor) }
Factory instantiates new Consensuses
type GHOSTDAGManagerConstructor ¶
type GHOSTDAGManagerConstructor func( databaseContext model.DBReader, dagTopologyManager model.DAGTopologyManager, ghostdagDataStore model.GHOSTDAGDataStore, headerStore model.BlockHeaderStore, k externalapi.KType, genesisHash *externalapi.DomainHash) model.GHOSTDAGManager
GHOSTDAGManagerConstructor is the function signature for a constructor of a type implementing model.GHOSTDAGManager
type PastMedianTimeManagerConstructor ¶
type PastMedianTimeManagerConstructor func(int, model.DBReader, model.DAGTraversalManager, model.BlockHeaderStore, model.GHOSTDAGDataStore, *externalapi.DomainHash) model.PastMedianTimeManager
PastMedianTimeManagerConstructor is the function signature for a constructor of a type implementing model.PastMedianTimeManager
Source Files ¶
Click to show internal directories.
Click to hide internal directories.