Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Fix the check logic of CALLCODE. #1285

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ethereumj-core/src/main/java/org/ethereum/vm/VM.java
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ else if (!currentValue.isZero() && newValue.isZero()) {
DataWord value = op.callHasValue() ?
program.stackPop() : DataWord.ZERO;

if (program.isStaticCall() && op == CALL && !value.isZero())
if (program.isStaticCall() && (op == CALL || op == CALLCODE) && !value.isZero())
throw new Program.StaticCallModificationException();

if (!value.isZero()) {
Expand Down