mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
core, eth/tracer/js: fix failing tests
This commit is contained in:
parent
cafdfc6982
commit
0e69f7ad5c
4 changed files with 5 additions and 5 deletions
|
|
@ -188,6 +188,7 @@ func TransactionToMessage(tx *types.Transaction, s types.Signer, baseFee *big.In
|
|||
// state and would never be accepted within a block.
|
||||
func ApplyMessage(evm *vm.EVM, msg *Message, gp *GasPool) (*ExecutionResult, error) {
|
||||
evm.SetTxContext(NewEVMTxContext(msg))
|
||||
|
||||
return NewStateTransition(evm, msg, gp).TransitionDb()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,8 @@ type VMContext struct {
|
|||
BlockNumber *big.Int
|
||||
Time uint64
|
||||
Random *common.Hash
|
||||
// Effective tx gas price
|
||||
GasPrice *big.Int
|
||||
StateDB StateDB
|
||||
BaseFee *big.Int
|
||||
StateDB StateDB
|
||||
}
|
||||
|
||||
// BlockEvent is emitted upon tracing an incoming block.
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ func (evm *EVM) GetVMContext() *tracing.VMContext {
|
|||
BlockNumber: evm.Context.BlockNumber,
|
||||
Time: evm.Context.Time,
|
||||
Random: evm.Context.Random,
|
||||
GasPrice: evm.TxContext.GasPrice,
|
||||
BaseFee: evm.Context.BaseFee,
|
||||
StateDB: evm.StateDB,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ func (t *jsTracer) OnTxStart(env *tracing.VMContext, tx *types.Transaction, from
|
|||
t.activePrecompiles = vm.ActivePrecompiles(rules)
|
||||
t.ctx["block"] = t.vm.ToValue(t.env.BlockNumber.Uint64())
|
||||
t.ctx["gas"] = t.vm.ToValue(tx.Gas())
|
||||
gasPriceBig, err := t.toBig(t.vm, env.GasPrice.String())
|
||||
gasPriceBig, err := t.toBig(t.vm, tx.EffectiveGasTipValue(env.BaseFee).String())
|
||||
if err != nil {
|
||||
t.err = err
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue