eth: fixed TestSendTx

This commit is contained in:
Pratik Patil 2025-05-28 10:27:59 +05:30
parent a9c568f48f
commit f97a44d5b1
No known key found for this signature in database
GPG key ID: AFDCA496554874B3

View file

@ -43,7 +43,7 @@ import (
var (
key, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
address = crypto.PubkeyToAddress(key.PublicKey)
funds = big.NewInt(1000_000_000_000_000)
funds = big.NewInt(10_000_000_000_000_000)
gspec = &core.Genesis{
Config: params.MergedTestChainConfig,
Alloc: types.GenesisAlloc{
@ -84,7 +84,7 @@ func initBackend(withLocal bool) *EthAPIBackend {
func makeTx(nonce uint64, gasPrice *big.Int, amount *big.Int, key *ecdsa.PrivateKey) *types.Transaction {
if gasPrice == nil {
gasPrice = big.NewInt(params.GWei)
gasPrice = big.NewInt(25 * params.GWei)
}
if amount == nil {
amount = big.NewInt(1000)
@ -134,7 +134,7 @@ func TestSendTx(t *testing.T) {
func testSendTx(t *testing.T, withLocal bool) {
b := initBackend(withLocal)
txA := pricedSetCodeTx(0, 250000, uint256.NewInt(params.GWei), uint256.NewInt(params.GWei), key, []unsignedAuth{
txA := pricedSetCodeTx(0, 250000, uint256.NewInt(25*params.GWei), uint256.NewInt(25*params.GWei), key, []unsignedAuth{
{
nonce: 0,
key: key,