mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
add log
This commit is contained in:
parent
84d280a2d3
commit
40b7dbbd9b
1 changed files with 5 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
)
|
||||
|
||||
|
|
@ -294,6 +295,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
if err := st.preCheck(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Info("PreCheck", "st.initialGas", st.initialGas, "st.gas", st.gas)
|
||||
|
||||
if st.evm.Config.Debug {
|
||||
st.evm.Config.Tracer.CaptureTxStart(st.initialGas)
|
||||
|
|
@ -314,6 +316,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Info("IntrinsicGas", "st.initialGas", st.initialGas, "st.gas", st.gas)
|
||||
if st.gas < gas {
|
||||
return nil, fmt.Errorf("%w: have %d, want %d", ErrIntrinsicGas, st.gas, gas)
|
||||
}
|
||||
|
|
@ -339,6 +342,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
st.state.SetNonce(msg.From(), st.state.GetNonce(sender.Address())+1)
|
||||
ret, st.gas, vmerr = st.evm.Call(sender, st.to(), st.data, st.gas, st.value)
|
||||
}
|
||||
log.Info("evm.Call", "st.initialGas", st.initialGas, "st.gas", st.gas)
|
||||
|
||||
if !rules.IsLondon {
|
||||
// Before EIP-3529: refunds were capped to gasUsed / 2
|
||||
|
|
@ -361,6 +365,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
|||
fee.Mul(fee, effectiveTip)
|
||||
st.state.AddBalance(st.evm.Context.Coinbase, fee)
|
||||
}
|
||||
log.Info("TransitionDb.return", "st.initialGas", st.initialGas, "st.gas", st.gas)
|
||||
|
||||
return &ExecutionResult{
|
||||
UsedGas: st.gasUsed(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue