Documentation ¶
Overview ¶
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or or http://www.opensource.org/licenses/mit-license.php
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ModuleElectSeed = "随机种子生成"
)
Functions ¶
func NewSubService ¶
func NewSubService(plug string, support baseinterface.RandomChainSupport) (baseinterface.RandomSubService, error)
func RegisterElectSeedPlugs ¶
func RegisterElectSeedPlugs(name string, plug ElectSeedPlugs)
Types ¶
type ElectSeedPlugs ¶
type ElectSeedPlugs interface { CalcSeed(common.Hash, baseinterface.RandomChainSupport) (*big.Int, error) Prepare(uint64, common.Hash, baseinterface.RandomChainSupport) error }
type ElectionSeed ¶
type ElectionSeed struct {
// contains filtered or unexported fields
}
type MinHashPlug ¶
type MinHashPlug struct {
// contains filtered or unexported fields
}
func (*MinHashPlug) CalcSeed ¶
func (self *MinHashPlug) CalcSeed(hash common.Hash, support baseinterface.RandomChainSupport) (*big.Int, error)
func (*MinHashPlug) Prepare ¶
func (self *MinHashPlug) Prepare(height uint64, hash common.Hash, support baseinterface.RandomChainSupport) error
Click to show internal directories.
Click to hide internal directories.