Change the injection count of fuel in a store from u32 to u64 (#3048)
* Change the injection count of fuel in a store from u32 to u64 This commit updates the type of the amount of times to inject fuel in the `out_of_fuel_async_yield` to `u64` instead of `u32`. This should allow effectively infinite fuel to get injected, even if a small amount of fuel is injected per iteration. Closes #2927 Closes #3046 * Fix tokio example
This commit is contained in:
@@ -392,7 +392,7 @@ fn iloop_with_fuel() {
|
||||
fn fuel_eventually_finishes() {
|
||||
let engine = Engine::new(Config::new().async_support(true).consume_fuel(true)).unwrap();
|
||||
let mut store = Store::new(&engine, ());
|
||||
store.out_of_fuel_async_yield(u32::max_value(), 10);
|
||||
store.out_of_fuel_async_yield(u64::max_value(), 10);
|
||||
let module = Module::new(
|
||||
&engine,
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user