Documentation ¶
Index ¶
- Variables
- func MergeRootGenesisFiles(rootGenesis []*genesis.RootGenesis) (*genesis.RootGenesis, []*genesis.PartitionGenesis, error)
- func NewPartitionRecordFromNodes(nodes []*genesis.PartitionNode) ([]*genesis.PartitionRecord, error)
- func NewRootGenesis(id string, s crypto.Signer, encPubKey []byte, ...) (*genesis.RootGenesis, []*genesis.PartitionGenesis, error)
- func RootGenesisAddSignature(rootGenesis *genesis.RootGenesis, id string, s crypto.Signer, encPubKey []byte) (*genesis.RootGenesis, error)
- type Option
- type UnicitySealFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEncryptionPubKeyIsNil = errors.New("encryption public key is nil")
View Source
var ErrSignerIsNil = errors.New("signer is nil")
Functions ¶
func MergeRootGenesisFiles ¶
func MergeRootGenesisFiles(rootGenesis []*genesis.RootGenesis) (*genesis.RootGenesis, []*genesis.PartitionGenesis, error)
func NewPartitionRecordFromNodes ¶
func NewPartitionRecordFromNodes(nodes []*genesis.PartitionNode) ([]*genesis.PartitionRecord, error)
func NewRootGenesis ¶
func NewRootGenesis(id string, s crypto.Signer, encPubKey []byte, partitions []*genesis.PartitionRecord, opts ...Option) (*genesis.RootGenesis, []*genesis.PartitionGenesis, error)
func RootGenesisAddSignature ¶
func RootGenesisAddSignature(rootGenesis *genesis.RootGenesis, id string, s crypto.Signer, encPubKey []byte) (*genesis.RootGenesis, error)
Types ¶
type Option ¶
type Option func(c *rootGenesisConf)
func WithBlockRate ¶
func WithConsensusTimeout ¶
func WithHashAlgorithm ¶
WithHashAlgorithm set custom hash algorithm (unused for now, remove?)
func WithQuorumThreshold ¶
func WithTotalNodes ¶
type UnicitySealFunc ¶
type UnicitySealFunc func(rootHash []byte) (*types.UnicitySeal, error)
Click to show internal directories.
Click to hide internal directories.