Documentation ¶
Index ¶
- Variables
- func InitDefaultKeypairs(idx int) (PubKey, PrivKey, []ValidatorInfo)
- type Poa
- func (h *Poa) AmILeader(blockHeight BlockNum) bool
- func (h *Poa) CheckTxn(txn *SignedTxn) error
- func (h *Poa) CompeteLeader(blockHeight BlockNum) Address
- func (h *Poa) EndBlock(block *Block)
- func (h *Poa) FinalizeBlock(block *Block)
- func (h *Poa) InitChain(block *Block)
- func (h *Poa) IsValidator(addr Address) bool
- func (h *Poa) LocalAddress() Address
- func (h *Poa) StartBlock(block *Block)
- func (h *Poa) ValidatorsP2pID() (peers []peer.ID)
- func (h *Poa) VerifyBlock(block *Block) error
- type PoaConfig
- type ValidatorConf
- type ValidatorInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSecrets = []string{
"node1",
"node2",
"node3",
}
Functions ¶
func InitDefaultKeypairs ¶
func InitDefaultKeypairs(idx int) (PubKey, PrivKey, []ValidatorInfo)
Types ¶
type Poa ¶
type Poa struct { *Tripod // contains filtered or unexported fields }
func (*Poa) CompeteLeader ¶
func (h *Poa) CompeteLeader(blockHeight BlockNum) Address
func (*Poa) FinalizeBlock ¶
func (h *Poa) FinalizeBlock(block *Block)
func (*Poa) IsValidator ¶
func (*Poa) LocalAddress ¶
func (h *Poa) LocalAddress() Address
func (*Poa) StartBlock ¶
func (h *Poa) StartBlock(block *Block)
func (*Poa) ValidatorsP2pID ¶
func (*Poa) VerifyBlock ¶
type PoaConfig ¶
type PoaConfig struct { KeyType string `toml:"key_type"` // secret for generating keypair. MySecret string `toml:"my_secret"` Validators []*ValidatorConf `toml:"validators"` // block out interval, seconds BlockInterval int `toml:"block_interval"` // the number of packing txns from txpool, default 5000 PackNum uint64 `toml:"pack_num"` PrettyLog bool `toml:"pretty_log"` }
func DefaultCfg ¶
type ValidatorConf ¶
type ValidatorInfo ¶
Click to show internal directories.
Click to hide internal directories.