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

Function pricedTransaction

core/tx_pool_test.go:77–80  ·  view source on GitHub ↗
(nonce uint64, gaslimit uint64, gasprice *big.Int, key *ecdsa.PrivateKey)

Source from the content-addressed store, hash-verified

75}
76
77func pricedTransaction(nonce uint64, gaslimit uint64, gasprice *big.Int, key *ecdsa.PrivateKey) *types.Transaction {
78 tx, _ := types.SignTx(types.NewTransaction(nonce, common.Address{}, big.NewInt(100), gaslimit, gasprice, nil), types.HomesteadSigner{}, key)
79 return tx
80}
81
82func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
83 statedb, _ := state.New(common.Hash{}, state.NewDatabase(database.NewMemDatabase()))

Calls 1

SignTxMethod · 0.65

Tested by

no test coverage detected