mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth/tracers: use types.NewTx instead too
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
d8aad5e8f2
commit
2adf9757cb
1 changed files with 24 additions and 3 deletions
|
|
@ -421,7 +421,14 @@ func TestTraceTransaction(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(uint64(i), accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ := types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: uint64(i),
|
||||||
|
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)
|
||||||
target = tx.Hash()
|
target = tx.Hash()
|
||||||
})
|
})
|
||||||
|
|
@ -471,7 +478,14 @@ func TestTraceBlock(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(uint64(i), accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ := types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: uint64(i),
|
||||||
|
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)
|
||||||
txHash = tx.Hash()
|
txHash = tx.Hash()
|
||||||
})
|
})
|
||||||
|
|
@ -561,7 +575,14 @@ func TestTracingWithOverrides(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(uint64(i), accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
|
tx, _ := types.SignTx(types.NewTx(&types.LegacyTx{
|
||||||
|
Nonce: uint64(i),
|
||||||
|
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)
|
||||||
})
|
})
|
||||||
defer backend.chain.Stop()
|
defer backend.chain.Stop()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue