Devnet5 Fix requests tests (#8201)

* Fix hive tests for eip7685
* Pass correct empty request hash

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>

---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
This commit is contained in:
Gabriel-Trintinalia
2025-01-31 13:11:52 +08:00
committed by GitHub
parent 57454cb7cf
commit 97a69b03c8
6 changed files with 85 additions and 20 deletions

View File

@@ -52,8 +52,25 @@ public enum RequestType {
case 0x01 -> WITHDRAWAL;
case 0x02 -> CONSOLIDATION;
default ->
throw new IllegalArgumentException(
throw new InvalidRequestTypeException(
String.format("Unsupported request type: 0x%02X", serializedTypeValue));
};
}
/**
* Exception thrown when an invalid request type is encountered.
*
* <p>This exception is thrown when a serialized type value does not correspond to any {@link
* RequestType}.
*/
public static class InvalidRequestTypeException extends IllegalArgumentException {
/**
* Constructs an {@link InvalidRequestTypeException} with the specified detail message.
*
* @param message the detail message.
*/
public InvalidRequestTypeException(final String message) {
super(message);
}
}
}