ethclient: fix test tx

This commit is contained in:
Ceyhun Onur 2024-08-24 17:14:18 +03:00
parent a053d408ef
commit 3cf60d090c
No known key found for this signature in database
GPG key ID: 60D53BEEE37F6422

View file

@ -258,10 +258,7 @@ func TestCommitReturnValue(t *testing.T) {
} }
// Create a block in the original chain (containing a transaction to force different block hashes) // Create a block in the original chain (containing a transaction to force different block hashes)
head, _ := client.HeaderByNumber(ctx, nil) // Should be child's, good enough tx, _ := newTx(sim, testKey)
gasPrice := new(big.Int).Add(head.BaseFee, big.NewInt(1))
_tx := types.NewTransaction(0, testAddr, big.NewInt(1000), params.TxGas, gasPrice, nil)
tx, _ := types.SignTx(_tx, types.HomesteadSigner{}, testKey)
if err := client.SendTransaction(ctx, tx); err != nil { if err := client.SendTransaction(ctx, tx); err != nil {
t.Errorf("sending transaction: %v", err) t.Errorf("sending transaction: %v", err)
} }