Calculating gas using usize (if supplied gaslimit fits in usize) (#1518)
* Spliting gasometer out of interpreter * Choosing right gas calculations implementation based on supplied gas * Moving verification out of gasometer * MemGasCost benchmark. Conflicts: ethcore/src/evm/benches/mod.rs * Some simple benchmarks * Benchmark for simple loop * Calculating gas_for_memory only when it's actually needed * Removing superfluous newline [ci skip]
This commit is contained in:
@@ -211,7 +211,7 @@ impl<'a> Executive<'a> {
|
||||
let vm_factory = self.vm_factory;
|
||||
let mut ext = self.as_externalities(OriginInfo::from(¶ms), unconfirmed_substate, output_policy, tracer, vm_tracer);
|
||||
trace!(target: "executive", "ext.schedule.have_delegate_call: {}", ext.schedule().have_delegate_call);
|
||||
return vm_factory.create().exec(params, &mut ext).finalize(ext);
|
||||
return vm_factory.create(params.gas).exec(params, &mut ext).finalize(ext);
|
||||
}
|
||||
|
||||
// Start in new thread to reset stack
|
||||
@@ -222,7 +222,7 @@ impl<'a> Executive<'a> {
|
||||
let mut ext = self.as_externalities(OriginInfo::from(¶ms), unconfirmed_substate, output_policy, tracer, vm_tracer);
|
||||
|
||||
scope.spawn(move || {
|
||||
vm_factory.create().exec(params, &mut ext).finalize(ext)
|
||||
vm_factory.create(params.gas).exec(params, &mut ext).finalize(ext)
|
||||
})
|
||||
}).join()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user