MCPcopy Create free account
hub / github.com/CPChain/chain / AddTx

Method AddTx

core/chain_makers.go:77–79  ·  view source on GitHub ↗

AddTx adds a transaction to the generated block. If no coinbase has been set, the block's coinbase is set to the zero address. AddTx panics if the transaction cannot be executed. In addition to the protocol-imposed limitations (gas limit, etc.), there are some further limitations on the content of

(tx *types.Transaction)

Source from the content-addressed store, hash-verified

75// added. Notably, contract code relying on the BLOCKHASH instruction
76// will panic during execution.
77func (b *BlockGen) AddTx(tx *types.Transaction) {
78 b.AddTxWithChain(nil, tx)
79}
80
81// AddTxWithChain adds a transaction to the generated block. If no coinbase has
82// been set, the block's coinbase is set to the zero address.

Callers 15

ExampleGenerateChainFunction · 0.80
genValueTxFunction · 0.80
genTxRingFunction · 0.80
TestChainTxReorgsFunction · 0.80
TestLogReorgsFunction · 0.80
TestReorgSideEventFunction · 0.80
AdjustTimeMethod · 0.80
newBlockchainWithDbFunction · 0.80
newBlockchainWithDbFunction · 0.80

Calls 1

AddTxWithChainMethod · 0.95

Tested by 15

ExampleGenerateChainFunction · 0.64
genValueTxFunction · 0.64
genTxRingFunction · 0.64
TestChainTxReorgsFunction · 0.64
TestLogReorgsFunction · 0.64
TestReorgSideEventFunction · 0.64
newBlockchainWithDbFunction · 0.64
newBlockchainWithDbFunction · 0.64
testGetNodeDataFunction · 0.64