Skip to content

Simulated backend Rollback() function should set gas tip back to the parameter passed by config #30429

Closed
@dahu33

Description

System information

Geth version: 1.14.8
OS & Version: OSX

Expected behaviour

Calling the Rollback() function on the simulated backend should set gas tip back to parameter passed by config as it was the case before #28202 was merged.

Actual behaviour

Currently the gas tip is arbitrary set to 1 Gwei after calling the Rollback() function, which is not even the default config parameter (1 wei).

There is a TODO in the code left by @MariusVanDerWijden here:

// TODO (Marius van der Wijden): set gas tip to parameter passed by config
c.eth.TxPool().SetGasTip(big.NewInt(params.GWei))

Steps to reproduce the behaviour

  1. Create a new simulated client with the default values.
  2. Call Rollback()
  3. Make a TX using the suggested gas tip.

You will get the error transaction underpriced: gas tip cap 1000000, minimum needed 1000000000.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions