electionseed

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

This section is empty.

Variables

View Source
var (
	ModuleElectSeed = "随机种子生成"
)

Functions

func CanVote

func CanVote(height uint64) bool

func RegisterElectSeedPlugs

func RegisterElectSeedPlugs(name string, plug ElectSeedPlugs)

Types

type ElectSeedPlugs

type ElectSeedPlugs interface {
	CalcSeed(common.Hash, baseinterface.RandomChainSupport) (*big.Int, error)
	Prepare(uint64, baseinterface.RandomChainSupport) error
}

type ElectionSeed

type ElectionSeed struct {
	// contains filtered or unexported fields
}

func (*ElectionSeed) CalcData

func (self *ElectionSeed) CalcData(calcData common.Hash) (*big.Int, error)

func (*ElectionSeed) Prepare

func (self *ElectionSeed) Prepare(height uint64) error

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, support baseinterface.RandomChainSupport) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL