commonsupport

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: 16 Imported by: 15

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

View Source
const (
	ModeleRandomCommon = "随机数服务公共组件"
)

Variables

This section is empty.

Functions

func CheckVoteDataIsCompare

func CheckVoteDataIsCompare(private []byte, public []byte) bool

func GetAncestorHash

func GetAncestorHash(hash common.Hash, height uint64, support baseinterface.RandomChainSupport) (common.Hash, error)

func GetCommonMap

func GetCommonMap(private map[common.Address][]byte, public map[common.Address][]byte) map[common.Address]VoteData

func GetDepositListByHeightAndRole

func GetDepositListByHeightAndRole(height *big.Int, role common.RoleType) ([]vm.DepositDetail, error)

func GetElectGenTimes

func GetElectGenTimes(support matrix.StateReader, height uint64) (*mc.ElectGenTimeStruct, error)

func GetMaxNonce

func GetMaxNonce(hash common.Hash, support baseinterface.RandomChainSupport) (uint64, error)

func GetMinHash

func GetMinHash(hash common.Hash, support baseinterface.RandomChainSupport) (common.Hash, error)

func GetNumberByHash

func GetNumberByHash(hash common.Hash, support baseinterface.RandomChainSupport) (uint64, error)

func GetSelfAddress

func GetSelfAddress() common.Address

func GetValidPrivateSum

func GetValidPrivateSum(commonMap map[common.Address]VoteData) *big.Int

func GetValidVoteSum

func GetValidVoteSum(hash common.Hash, support baseinterface.RandomChainSupport) (*big.Int, error)

func GetVoteData

func GetVoteData() (*big.Int, []byte, error)

Types

type VoteData

type VoteData struct {
	PrivateData []byte
	PublicData  []byte
}

Jump to

Keyboard shortcuts

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