github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/consensus/dbft/config.go (about)

     1  package dbft
     2  
     3  import "github.com/quickchainproject/quickchain/common"
     4  
     5  type ProposerPolicy uint64
     6  
     7  const (
     8  	RoundRobin ProposerPolicy = iota
     9  	Sticky
    10  )
    11  
    12  type Config struct {
    13  	RequestTimeout uint64           `toml:",omitempty"` // The timeout for each DBFT round in milliseconds.
    14  	BlockPeriod    uint64           `toml:",omitempty"` // Default minimum difference between two consecutive block's timestamps in second
    15  	ProposerPolicy ProposerPolicy   `toml:",omitempty"` // The policy for proposer selection
    16  	Epoch          uint64           `toml:",omitempty"` // The number of blocks after which to checkpoint and reset the pending votes
    17  	Validators     []common.Address `toml:",omitempty"` // Genesis validator list
    18  }
    19  
    20  var DefaultConfig = &Config{
    21  	RequestTimeout: 10000,
    22  	BlockPeriod:    3,
    23  	ProposerPolicy: RoundRobin,
    24  	Epoch:          30000,
    25  }