derivesha

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveShaMux

func DeriveShaMux(list types.DerivableList, num *big.Int) common.Hash

func EmptyRootHashMux

func EmptyRootHashMux(num *big.Int) common.Hash

func InitDeriveSha

func InitDeriveSha(chainConfig *params.ChainConfig, govEngine GovernanceEngine)

Types

type DeriveShaConcat

type DeriveShaConcat struct{}

An alternative implementation of DeriveSha() This function generates a hash of `DerivableList` as below: 1. make a byte slice by concatenating RLP-encoded items 2. make a hash of the byte slice.

func (DeriveShaConcat) DeriveSha

func (d DeriveShaConcat) DeriveSha(list types.DerivableList) (hash common.Hash)

type DeriveShaOrig

type DeriveShaOrig struct{}

func (DeriveShaOrig) DeriveSha

func (d DeriveShaOrig) DeriveSha(list types.DerivableList) common.Hash

type DeriveShaSimple

type DeriveShaSimple struct{}

An alternative implementation of DeriveSha() This function generates a hash of `DerivableList` by simulating merkle tree generation

func (DeriveShaSimple) DeriveSha

func (d DeriveShaSimple) DeriveSha(list types.DerivableList) common.Hash

type GovernanceEngine

type GovernanceEngine interface {
	EffectiveParams(num uint64) (*params.GovParamSet, error)
}

type IDeriveSha

type IDeriveSha interface {
	DeriveSha(list types.DerivableList) common.Hash
}

Jump to

Keyboard shortcuts

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