eth/catalyst: add comment

This commit is contained in:
Marius van der Wijden 2023-12-18 11:31:02 +01:00
parent 45953a9896
commit d71bfff552

View file

@ -20,7 +20,6 @@ import (
"crypto/rand" "crypto/rand"
"errors" "errors"
"math" "math"
"math/big"
"sync" "sync"
"time" "time"
@ -31,7 +30,6 @@ import (
"github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/rpc"
) )
@ -284,11 +282,10 @@ func (c *SimulatedBeacon) Commit() common.Hash {
// Rollback un-sends previously added transactions. // Rollback un-sends previously added transactions.
func (c *SimulatedBeacon) Rollback() { func (c *SimulatedBeacon) Rollback() {
// Flush all transactions from the transaction pools // TODO (MariusVanDerWijden): implement a way in the transaction pool
c.eth.TxPool().SetGasTip(big.NewInt(-1)) // to flush _all_ transactions, even local transactions.
// Set the gas tip back to accept new transactions // Since the transactions send via the simulated backend are all
// TODO (Marius van der Wijden): set gas tip to parameter passed by config // send via the RPC, they end up all being local to the node
c.eth.TxPool().SetGasTip(big.NewInt(params.GWei))
} }
// Fork sets the head to the provided hash. // Fork sets the head to the provided hash.