Skip to content

Commit

Permalink
feat: remove an unused param in CalcBaseFee
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Feb 2, 2025
1 parent d579154 commit 0b47ac3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func (i *BlocksInserterOntake) InsertBlocks(
baseFee, err := i.rpc.CalculateBaseFee(
ctx,
parent,
new(big.Int).SetUint64(meta.GetAnchorBlockID()),
false,
(*pacayaBindings.LibSharedDataBaseFeeConfig)(meta.GetBaseFeeConfig()),
meta.GetTimestamp(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func (i *BlocksInserterPacaya) InsertBlocks(
baseFee, err := i.rpc.CalculateBaseFee(
ctx,
parent,
new(big.Int).SetUint64(meta.GetAnchorBlockID()),
true,
meta.GetBaseFeeConfig(),
timestamp,
Expand Down Expand Up @@ -266,7 +265,6 @@ func (i *BlocksInserterPacaya) InsertPreconfBlockFromTransactionsBatch(
baseFee, err := i.rpc.CalculateBaseFee(
ctx,
parentHeader,
new(big.Int).SetUint64(anchorBlockID),
true,
baseFeeConfig,
executableData.Timestamp,
Expand Down
1 change: 0 additions & 1 deletion packages/taiko-client/internal/testutils/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ func (s *ClientTestSuite) ProposeValidBlock(
baseFee, err := s.RPCClient.CalculateBaseFee(
context.Background(),
l2Head,
l1Head.Number,
l2Head.Number.Uint64()+1 >= s.RPCClient.PacayaClients.ForkHeight,
protocolConfigs.BaseFeeConfig(),
l1Head.Time,
Expand Down
8 changes: 0 additions & 8 deletions packages/taiko-client/pkg/rpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ func (c *Client) WaitL2Header(ctx context.Context, blockID *big.Int) (*types.Hea
func (c *Client) CalculateBaseFee(
ctx context.Context,
l2Head *types.Header,
anchorBlockID *big.Int,
postPacaya bool,
baseFeeConfig *pacayaBindings.LibSharedDataBaseFeeConfig,
currentTimestamp uint64,
Expand All @@ -400,7 +399,6 @@ func (c *Client) CalculateBaseFee(
"Base fee information",
"fee", utils.WeiToGWei(baseFee),
"l2Head", l2Head.Number,
"anchorBlockID", anchorBlockID,
"postPacaya", postPacaya,
)

Expand All @@ -423,11 +421,6 @@ func (c *Client) GetPoolContent(
ctxWithTimeout, cancel := CtxWithTimeoutOrDefault(ctx, defaultTimeout)
defer cancel()

l1Head, err := c.L1.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
}

l2Head, err := c.L2.HeaderByNumber(ctx, nil)
if err != nil {
return nil, err
Expand All @@ -436,7 +429,6 @@ func (c *Client) GetPoolContent(
baseFee, err := c.CalculateBaseFee(
ctx,
l2Head,
l1Head.Number,
chainConfig.IsPacaya(new(big.Int).Add(l2Head.Number, common.Big1)),
baseFeeConfig,
uint64(time.Now().Unix()),
Expand Down

0 comments on commit 0b47ac3

Please sign in to comment.