Skip to content

Commit

Permalink
Revert "OverrideShanghaiTime -> OverrideCancunTime (ledgerwatch#1067)"
Browse files Browse the repository at this point in the history
This reverts commit d574daa.
  • Loading branch information
pratikspatil024 authored Aug 18, 2023
1 parent 7c9c722 commit 53625de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions txpool/txpoolcfg/txpoolcfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Config struct {
MinFeeCap uint64
AccountSlots uint64 // Number of executable transaction slots guaranteed per account
PriceBump uint64 // Price bump percentage to replace an already existing transaction
OverrideCancunTime *big.Int
OverrideShanghaiTime *big.Int
}

var DefaultConfig = Config{
Expand All @@ -53,9 +53,10 @@ var DefaultConfig = Config{
BaseFeeSubPoolLimit: 10_000,
QueuedSubPoolLimit: 10_000,

MinFeeCap: 1,
AccountSlots: 16, //TODO: to choose right value (16 to be compatible with Geth)
PriceBump: 10, // Price bump percentage to replace an already existing transaction
MinFeeCap: 1,
AccountSlots: 16, //TODO: to choose right value (16 to be compatible with Geth)
PriceBump: 10, // Price bump percentage to replace an already existing transaction
OverrideShanghaiTime: nil,
}

type DiscardReason uint8
Expand Down
6 changes: 3 additions & 3 deletions txpool/txpooluitl/all_components.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ func AllComponents(ctx context.Context, cfg txpoolcfg.Config, cache kvcache.Cach
chainID, _ := uint256.FromBig(chainConfig.ChainID)

shanghaiTime := chainConfig.ShanghaiTime
cancunTime := chainConfig.CancunTime
if cfg.OverrideCancunTime != nil {
cancunTime = cfg.OverrideCancunTime
if cfg.OverrideShanghaiTime != nil {
shanghaiTime = cfg.OverrideShanghaiTime
}
cancunTime := chainConfig.CancunTime

txPool, err := txpool.New(newTxs, chainDB, cfg, cache, *chainID, shanghaiTime, cancunTime, logger)
if err != nil {
Expand Down

0 comments on commit 53625de

Please sign in to comment.