mock

package
v1.4.1-beta Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestSendBlock            types.StateBlock
	TestReceiveBlock         types.StateBlock
	TestSendGasBlock         types.StateBlock
	TestReceiveGasBlock      types.StateBlock
	TestChangeRepresentative types.StateBlock
)
View Source
var (
	Account1 = types.NewAccount(priv1)
	Account2 = types.NewAccount(priv2)
	Account3 = types.NewAccount(priv3)
)
View Source
var (
	MockBlocks = `` /* 7844-byte string literal not displayed */

)

Functions

func Account

func Account() *types.Account

func AccountMeta

func AccountMeta(addr types.Address) *types.AccountMeta

func Address

func Address() types.Address

func BlockChain

func BlockChain(isGas bool) ([]*types.StateBlock, error)

func BlockChainWithAccount added in v1.4.0

func BlockChainWithAccount(isGas bool) ([]*types.StateBlock, *types.Account, *types.Account, error)

func ContractBlocks added in v1.3.1

func ContractBlocks() []*types.StateBlock

func GenerateAuxPow added in v1.4.0

func GenerateAuxPow(msgBlockHash types.Hash) *types.PovAuxHeader

func GenerateGenesisPovBlock added in v1.3.0

func GenerateGenesisPovBlock() (*types.PovBlock, *types.PovTD)

func GeneratePovBlock added in v1.2.4

func GeneratePovBlock(prevBlock *types.PovBlock, txNum uint32) (*types.PovBlock, *types.PovTD)

func GeneratePovBlockByFakePow added in v1.4.0

func GeneratePovBlockByFakePow(prevBlock *types.PovBlock, txNum uint32) (*types.PovBlock, *types.PovTD)

func GeneratePovCoinbase added in v1.2.4

func GeneratePovCoinbase() *types.Account

func Hash

func Hash() types.Hash

func PovHeader added in v1.3.0

func PovHeader() *types.PovHeader

func SmartContractBlock

func SmartContractBlock() *types.SmartContractBlock

func StateBlock

func StateBlock() *types.StateBlock

func StateBlockWithAddress added in v1.2.7

func StateBlockWithAddress(addr types.Address) *types.StateBlock

func StateBlockWithoutWork

func StateBlockWithoutWork() *types.StateBlock

func TokenMeta

func TokenMeta(addr types.Address) *types.TokenMeta

func TokenMeta2 added in v1.4.0

func TokenMeta2(addr types.Address, token types.Hash) *types.TokenMeta

func UpdatePovHash added in v1.4.0

func UpdatePovHash(povBlk *types.PovBlock)

Types

type Mac

type Mac [6]byte

func NewRandomMac

func NewRandomMac() Mac

func (Mac) String

func (m Mac) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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