testutil

package
v0.1.1-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBlock

func MakeBlock(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key) types.Block

MakeBlock creates a block

func MakeBlockWithBalanceTx

func MakeBlockWithBalanceTx(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key) types.Block

MakeBlockWithBalanceTx is like MakeBlockWithSingleTx but does not require a sender nonce

func MakeBlockWithNoTx

func MakeBlockWithNoTx(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key) types.Block

MakeBlockWithNoTx creates a block with no transaction in it.

func MakeBlockWithOnlyAllocTx

func MakeBlockWithOnlyAllocTx(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key) types.Block

MakeBlockWithOnlyAllocTx creates a block with only one allocation transaction

func MakeBlockWithParentHash

func MakeBlockWithParentHash(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key, parentHash util.Hash) types.Block

MakeBlockWithParentHash creates a block with one balance transaction and a given parent block hash

func MakeBlockWithSingleTx

func MakeBlockWithSingleTx(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key, senderNonce uint64) types.Block

MakeBlockWithSingleTx creates a block with only one balance transaction. Sender nonce is required

func MakeBlockWithTotalDifficulty

func MakeBlockWithTotalDifficulty(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key, td *big.Int) types.Block

MakeBlockWithTotalDifficulty creates a block with one balance transaction and a given total difficulty

func MakeTestBlock

func MakeTestBlock(bc types.Blockchain, chain types.Chainer, gp *types.GenerateBlockParams) types.Block

MakeTestBlock creates a block and adds the transactions in the transactions pool attached to the blockchain instance

Types

This section is empty.

Jump to

Keyboard shortcuts

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