mirror of
https://github.com/status-im/ethereumj-personal.git
synced 2025-02-17 22:27:13 +00:00
Play program dialog
+ Fix for OOG Exception
This commit is contained in:
parent
18fee1eff8
commit
708428c01e
@ -50,14 +50,6 @@ public class Program {
|
||||
this.invokeData = invokeData;
|
||||
this.ops = ops;
|
||||
|
||||
// In case the program invoked by wire got
|
||||
// transaction, this will be the gas cost,
|
||||
// otherwise the call done by other contract
|
||||
// charged by CALL op
|
||||
if (invokeData.byTransaction()){
|
||||
spendGas(GasCost.TRANSACTION, "TRANSACTION");
|
||||
spendGas(GasCost.TXDATA * invokeData.getDataSize().intValue(), "DATA");
|
||||
}
|
||||
|
||||
if (invokeData.getStorage() != null){
|
||||
storage = invokeData.getStorage();
|
||||
|
@ -569,6 +569,17 @@ public class VM {
|
||||
|
||||
public void play(Program program) {
|
||||
try {
|
||||
|
||||
// In case the program invoked by wire got
|
||||
// transaction, this will be the gas cost,
|
||||
// otherwise the call done by other contract
|
||||
// charged by CALL op
|
||||
if (program.invokeData.byTransaction()){
|
||||
program.spendGas(GasCost.TRANSACTION, "TRANSACTION");
|
||||
program.spendGas(GasCost.TXDATA * program.invokeData.getDataSize().intValue(), "DATA");
|
||||
}
|
||||
|
||||
|
||||
while(!program.isStopped())
|
||||
this.step(program);
|
||||
} catch (RuntimeException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user