mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth/tracers: use types.NewTx instead
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
a5d05ad71f
commit
d8aad5e8f2
1 changed files with 24 additions and 3 deletions
|
|
@ -205,18 +205,39 @@ func TestTraceCall(t *testing.T) {
|
||||||
// Transfer from account[0] to account[1]
|
// Transfer from account[0] to account[1]
|
||||||
// value: 1000 wei
|
// value: 1000 wei
|
||||||
// fee: 0 wei
|
// fee: 0 wei
|
||||||
tx, _ := types.SignTx(types.NewTransaction(nonce, accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ := types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: nonce,
|
||||||
|
To: &accounts[1].addr,
|
||||||
|
Value: big.NewInt(1000),
|
||||||
|
Gas: params.TxGas,
|
||||||
|
GasPrice: b.BaseFee(),
|
||||||
|
Data: nil}),
|
||||||
|
signer, accounts[0].key)
|
||||||
b.AddTx(tx)
|
b.AddTx(tx)
|
||||||
nonce++
|
nonce++
|
||||||
|
|
||||||
if i == genBlocks-2 {
|
if i == genBlocks-2 {
|
||||||
// Transfer from account[0] to account[2]
|
// Transfer from account[0] to account[2]
|
||||||
tx, _ = types.SignTx(types.NewTransaction(nonce, accounts[2].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ = types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: nonce,
|
||||||
|
To: &accounts[2].addr,
|
||||||
|
Value: big.NewInt(1000),
|
||||||
|
Gas: params.TxGas,
|
||||||
|
GasPrice: b.BaseFee(),
|
||||||
|
Data: nil}),
|
||||||
|
signer, accounts[0].key)
|
||||||
b.AddTx(tx)
|
b.AddTx(tx)
|
||||||
nonce++
|
nonce++
|
||||||
|
|
||||||
// Transfer from account[0] to account[1] again
|
// Transfer from account[0] to account[1] again
|
||||||
tx, _ = types.SignTx(types.NewTransaction(nonce, accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ = types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: nonce,
|
||||||
|
To: &accounts[1].addr,
|
||||||
|
Value: big.NewInt(1000),
|
||||||
|
Gas: params.TxGas,
|
||||||
|
GasPrice: b.BaseFee(),
|
||||||
|
Data: nil}),
|
||||||
|
signer, accounts[0].key)
|
||||||
b.AddTx(tx)
|
b.AddTx(tx)
|
||||||
nonce++
|
nonce++
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue