Skip to content

Commit fea8553

Browse files
committed
add more fixes
1 parent 1bdae10 commit fea8553

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/vm/evm.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,11 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
542542
} else {
543543
// Contract creation completed, touch the missing fields in the contract
544544
if !contract.UseGas(evm.Accesses.TouchFullAccount(address.Bytes()[:], true), evm.Config.Tracer, tracing.GasChangeWitnessContractCreation) {
545-
err = ErrOutOfGas
545+
err = ErrCodeStoreOutOfGas
546546
}
547547

548-
if err != nil && len(ret) > 0 && !contract.UseGas(evm.Accesses.TouchCodeChunksRangeAndChargeGas(address.Bytes(), 0, uint64(len(ret)), uint64(len(ret)), true), evm.Config.Tracer, tracing.GasChangeWitnessCodeChunk) {
549-
err = ErrOutOfGas
548+
if err == nil && len(ret) > 0 && !contract.UseGas(evm.Accesses.TouchCodeChunksRangeAndChargeGas(address.Bytes(), 0, uint64(len(ret)), uint64(len(ret)), true), evm.Config.Tracer, tracing.GasChangeWitnessCodeChunk) {
549+
err = ErrCodeStoreOutOfGas
550550
}
551551
}
552552

0 commit comments

Comments
 (0)