Documentation ¶
Index ¶
- func MakeBlock(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key) types.Block
- func MakeBlockWithParentHash(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, ...) types.Block
- func MakeBlockWithTDAndNonce(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64, ...) types.Block
- func MakeBlockWithTotalDifficulty(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, td *big.Int) types.Block
- func MakeBlockWithTx(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64) types.Block
- func MakeBlockWithTxAndReceiver(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key, ...) types.Block
- func MakeBlockWithTxAndTime(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64, ...) types.Block
- func MakeBlockWithTxNotInPool(bc types.Blockchain, ch types.Chainer, sender *crypto.Key) types.Block
- func MakeTestBlock(bc types.Blockchain, chain types.Chainer, gp *types.GenerateBlockParams) types.Block
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBlockWithParentHash ¶
func MakeBlockWithParentHash(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, parentHash util.Hash) types.Block
MakeBlockWithParentHash creates a block with one balance transaction and a given parent block hash
func MakeBlockWithTDAndNonce ¶
func MakeBlockWithTDAndNonce(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64, td *big.Int) types.Block
MakeBlockWithTDAndNonce creates a block with one transaction, a given total difficulty and sender tx nonce
func MakeBlockWithTotalDifficulty ¶
func MakeBlockWithTotalDifficulty(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, td *big.Int) types.Block
MakeBlockWithTotalDifficulty creates a block with one balance transaction and a given total difficulty
func MakeBlockWithTx ¶
func MakeBlockWithTx(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64) types.Block
MakeBlockWithTx creates a block with only one balance transaction. The sender param is used as the transaction sender and receiver. The sender nonce must be consistent with the provided chain.
func MakeBlockWithTxAndReceiver ¶
func MakeBlockWithTxAndReceiver(bc types.Blockchain, ch types.Chainer, sender, receiver *crypto.Key, senderNonce uint64) types.Block
MakeBlockWithTxAndReceiver is like MakeBlockWithTx but it also accepts a receiver address.
func MakeBlockWithTxAndTime ¶
func MakeBlockWithTxAndTime(bc types.Blockchain, ch types.Chainer, sender *crypto.Key, senderNonce uint64, blockTime int64) types.Block
MakeBlockWithTxAndTime creates a block with only one balance transaction. It overrides the block time using blockTime. The sender nonce must be consistent with the provided chain.
func MakeBlockWithTxNotInPool ¶
func MakeBlockWithTxNotInPool(bc types.Blockchain, ch types.Chainer, sender *crypto.Key) types.Block
MakeBlockWithTxNotInPool is like MakeBlockWithTx but does not add the transactions in the pool
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.