Skip to content

Commit

Permalink
core/vm: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ziogaschr committed Aug 30, 2023
1 parent 8befbf6 commit 384fd3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/vm/evmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ func (host *hostContext) Selfdestruct(evmcAddr evmc.Address, evmcBeneficiary evm
db.AddRefund(vars.SelfdestructRefundGas)
}
db.AddBalance(beneficiary, db.GetBalance(addr))
return db.SelfDestruct(addr)
db.SelfDestruct(addr)
// TODO (ziogaschr): check what to return
return true
}

func (host *hostContext) GetTxContext() evmc.TxContext {
Expand All @@ -398,7 +400,7 @@ func (host *hostContext) GetTxContext() evmc.TxContext {
Origin: evmc.Address(host.env.TxContext.Origin),
Coinbase: evmc.Address(host.env.Context.Coinbase),
Number: host.env.Context.BlockNumber.Int64(),
Timestamp: host.env.Context.Time,
Timestamp: int64(host.env.Context.Time),
GasLimit: int64(host.env.Context.GasLimit),
ChainID: evmc.Hash(common.BigToHash(host.env.chainConfig.GetChainID())),
BaseFee: evmc.Hash{},
Expand Down

0 comments on commit 384fd3b

Please sign in to comment.