From 81f9fc9c332a51380c6678df790b7e374751ef0d Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Thu, 3 Oct 2024 23:25:29 -0600 Subject: [PATCH] Change evmtool eof-test handling of empty code (#7675) In EOFTest, treat empty code as invalid. Signed-off-by: Danno Ferrin --- .../java/org/hyperledger/besu/evmtool/EOFTestSubCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EOFTestSubCommand.java b/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EOFTestSubCommand.java index 94f8b2cd492..fb28701f777 100644 --- a/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EOFTestSubCommand.java +++ b/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EOFTestSubCommand.java @@ -224,7 +224,7 @@ public TestResult considerCode(final String hexCode) { return failed(re.getMessage()); } if (codeBytes.isEmpty()) { - return passed(); + return failed("invalid_magic code is zero-length"); } var layout = EOFLayout.parseEOF(codeBytes);