Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrust committed Nov 6, 2024
1 parent c2c7563 commit 3335bb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ethstorage/miner/l1_mining_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -90,6 +91,7 @@ func (m *l1MiningAPI) SubmitMinedResult(ctx context.Context, contract common.Add
m.lg.Error("Failed to compose calldata", "error", err)
return common.Hash{}, err
}
m.lg.Info("Composed calldata", "calldata", hexutil.Encode(calldata))

tip, gasFeeCap, useConfig, err := m.suggestGasPrices(ctx, cfg)
if err != nil {
Expand Down Expand Up @@ -249,6 +251,8 @@ func (m *l1MiningAPI) suggestGasPrices(ctx context.Context, cfg Config) (*big.In
}
gasFeeCap = new(big.Int).Add(blockHeader.BaseFee, tip)
m.lg.Info("Suggested gas fee cap", "gasFeeCap", gasFeeCap)
} else {
m.lg.Info("Using configured gas price", "gasFeeCap", gasFeeCap, "tip", tip)
}
return tip, gasFeeCap, useConfig, nil
}

0 comments on commit 3335bb9

Please sign in to comment.