github.com/arieschain/arieschain@v0.0.0-20191023063405-37c074544356/consensus/bft/config.go (about) 1 package bft 2 3 type ProposerPolicy uint64 4 5 const ( 6 RoundRobin ProposerPolicy = iota 7 Sticky 8 ) 9 10 type Config struct { 11 RequestTimeout uint64 `toml:",omitempty"` // The timeout for each BFT round in milliseconds. 12 BlockPeriod uint64 `toml:",omitempty"` // Default minimum difference between two consecutive block's timestamps in second 13 ProposerPolicy ProposerPolicy `toml:",omitempty"` // The policy for proposer selection 14 Epoch uint64 `toml:",omitempty"` // The number of blocks after which to checkpoint and reset the pending votes 15 } 16 17 var DefaultConfig = &Config{ 18 RequestTimeout: 10000, 19 BlockPeriod: 1, 20 ProposerPolicy: RoundRobin, 21 Epoch: 30000, 22 }