github.com/iotexproject/iotex-core@v1.14.1-rc1/consensus/config.go (about) 1 package consensus 2 3 import ( 4 "github.com/iotexproject/iotex-core/consensus/scheme/rolldpos" 5 ) 6 7 const ( 8 // RollDPoSScheme means randomized delegated proof of stake 9 RollDPoSScheme = "ROLLDPOS" 10 // StandaloneScheme means that the node creates a block periodically regardless of others (if there is any) 11 StandaloneScheme = "STANDALONE" 12 // NOOPScheme means that the node does not create only block 13 NOOPScheme = "NOOP" 14 ) 15 16 var ( 17 //DefaultConfig is the default config for blocksync 18 DefaultConfig = Config{ 19 Scheme: StandaloneScheme, 20 RollDPoS: rolldpos.DefaultConfig, 21 } 22 ) 23 24 type ( 25 // Config is the config struct for consensus package 26 Config struct { 27 // There are three schemes that are supported 28 Scheme string `yaml:"scheme"` 29 RollDPoS rolldpos.Config `yaml:"rollDPoS"` 30 } 31 )