minor fixes
This commit is contained in:
parent
409d22a0a3
commit
1232311ab1
|
@ -80,8 +80,8 @@ public class VM {
|
|||
program.spendGas(GasCost.CALL, OpCode.code(op).name());
|
||||
break;
|
||||
case SSTORE: case STOP:
|
||||
// The ops that doesn't charged by step, or charge
|
||||
// in the following section
|
||||
// The ops that doesn't charged by step, or
|
||||
// charged in the following section
|
||||
break;
|
||||
default:
|
||||
program.spendGas(GasCost.STEP, OpCode.code(op).name());
|
||||
|
@ -119,7 +119,6 @@ public class VM {
|
|||
program.step();
|
||||
} break;
|
||||
case DIV:{
|
||||
|
||||
DataWord word1 = program.stackPop();
|
||||
DataWord word2 = program.stackPop();
|
||||
word1.div(word2);
|
||||
|
@ -127,7 +126,6 @@ public class VM {
|
|||
program.step();
|
||||
} break;
|
||||
case SDIV:{
|
||||
|
||||
DataWord word1 = program.stackPop();
|
||||
DataWord word2 = program.stackPop();
|
||||
word1.sDiv(word2);
|
||||
|
|
|
@ -12,6 +12,8 @@ import org.spongycastle.util.encoders.Hex;
|
|||
import java.math.BigInteger;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* www.ethereumJ.com
|
||||
*
|
||||
|
@ -39,6 +41,8 @@ public class VMComplexTest {
|
|||
stop
|
||||
*/
|
||||
|
||||
int expectedGas = 438;
|
||||
|
||||
DataWord key1 = new DataWord(999);
|
||||
DataWord value1 = new DataWord(3);
|
||||
|
||||
|
@ -91,6 +95,7 @@ public class VMComplexTest {
|
|||
}
|
||||
|
||||
|
||||
System.out.println();
|
||||
System.out.println("============ Results ============");
|
||||
AccountState as =
|
||||
new AccountState(WorldManager.instance.worldState.get(
|
||||
|
@ -100,6 +105,7 @@ public class VMComplexTest {
|
|||
System.out.println("*** Contract Balance: " + as.getBalance());
|
||||
|
||||
|
||||
assertEquals(expectedGas, program.result.getGasUsed());
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue