use of org.ethereum.vm.VM in project rskj by rsksmart.
the class ExtCodeHashTest method testDoEXTCODEHASHWithoutArguments.
@Test
public void testDoEXTCODEHASHWithoutArguments() {
int gasExpected = 1000000;
String stringCode = " EXTCODEHASH";
byte[] code = compiler.compile(stringCode);
VM vm = new VM(vmConfig, precompiledContracts);
Program program = new Program(vmConfig, precompiledContracts, blockFactory, activationConfig, code, invoke, transaction, new HashSet<>());
try {
while (!program.isStopped()) {
vm.step(program);
}
} catch (Program.StackTooSmallException e) {
Assert.assertEquals(0, program.getStack().size());
Assert.assertEquals(gasExpected, program.getResult().getGasUsed());
}
}
Aggregations