Skip to content

Commit

Permalink
Fix gas price logger (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
sieniven authored Jul 11, 2024
1 parent f27add6 commit 3fc040b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/rpcdaemon/commands/eth_system_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"math/big"
"strconv"
"time"
Expand Down Expand Up @@ -35,7 +36,7 @@ func (api *APIImpl) gasPriceXL(ctx context.Context) (*hexutil.Big, error) {

price, err := api.getGPFromTrustedNode()
if err != nil {
log.Error("eth_gasPrice error: ", err)
log.Error(fmt.Sprintf("eth_gasPrice error: %v", err))
return (*hexutil.Big)(api.L2GasPricer.GetConfig().Default), nil
}

Expand Down
2 changes: 1 addition & 1 deletion eth/gasprice/gaspricesuggester_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewL2GasPriceSuggester(ctx context.Context, cfg gaspricecfg.Config) L2GasPr
log.Info("Fixed type selected")
gpricer = newFixedGasPriceSuggester(ctx, cfg)
default:
log.Error("unknown l2 gas price suggester type ", cfg.XLayer.Type, ". Please specify a valid one: 'follower', 'fixed' or 'default'")
log.Error(fmt.Sprintf("unknown l2 gas price suggester type %v. Please specify a valid one: 'follower', 'fixed' or 'default'", cfg.XLayer.Type))
}

return gpricer
Expand Down

0 comments on commit 3fc040b

Please sign in to comment.