Documentation ¶
Index ¶
- Constants
- Variables
- func MajorityCount(validatorCount int) int
- func NewRoleStore(genesis *Genesis, peers []*Peer) *roleStore
- func ReadNodeKey(datadir string) (*core.PrivateKey, error)
- func Run(config Config)
- func StringToPubKey(v string) *core.PublicKey
- func WriteGenesisFile(datadir string, genesis *Genesis) error
- func WriteNodeKey(datadir string, key *core.PrivateKey) error
- func WritePeersFile(datadir string, peers []*Peer) error
- type Config
- type Genesis
- type Node
- type Peer
Constants ¶
View Source
const ( NodekeyFile = "nodekey" GenesisFile = "genesis.json" PeersFile = "peers.json" )
View Source
const MaxProcsNum = 8 // set corresponding num of CPUs when benchmark test
View Source
const MinGraceHeight = 4
Variables ¶
View Source
var DefaultConfig = Config{ PointPort: 15150, TopicPort: 16160, APIPort: 9090, BroadcastTx: true, StorageConfig: storage.DefaultConfig, ExecutionConfig: execution.DefaultConfig, ConsensusConfig: consensus.DefaultConfig, }
Functions ¶
func MajorityCount ¶
MajorityCount returns 2f + 1 members
func NewRoleStore ¶
func ReadNodeKey ¶
func ReadNodeKey(datadir string) (*core.PrivateKey, error)
func StringToPubKey ¶
func WriteGenesisFile ¶
func WriteNodeKey ¶
func WriteNodeKey(datadir string, key *core.PrivateKey) error
func WritePeersFile ¶
Types ¶
type Genesis ¶
func ReadGenesis ¶
Click to show internal directories.
Click to hide internal directories.