Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculate_gas_info doesn't work for WaitDispatch #1242

Closed
clearloop opened this issue Jul 27, 2022 · 0 comments · Fixed by #1276
Closed

calculate_gas_info doesn't work for WaitDispatch #1242

clearloop opened this issue Jul 27, 2022 · 0 comments · Fixed by #1276
Labels
C0-bug Something isn't working

Comments

@clearloop
Copy link
Contributor

clearloop commented Jul 27, 2022

Problem

#[test]
fn calculate_gas_info_for_wait_dispatch_works() { 
    let GasInfo {
        min_limit: init_gas_spent,
        ..
    } = Gear::calculate_gas_info(
        USER_1.into_origin(),
        HandleKind::Init(demo_init_wait::WASM_BINARY.to_vec()),                                                                                   
        EMPTY_PAYLOAD.to_vec(),
        0,
        true,
    ).unwrap();
}

Self::charge_for_hold(

also, this reaches

unreachable!("Failed to figure out correct wait hold bound");

Steps

Write the code snippnet above inside tests.

Possible Solution

Charge WaitDispatch here

match note {

Notes

No response

Relevant Log Output

Click to expand/collapse

<Paste your log here>

@clearloop clearloop added the C0-bug Something isn't working label Jul 27, 2022
@clearloop clearloop changed the title pallet_gear::Pallet::calculate_gas_info doesn't work for WaitDispatch calculate_gas_info doesn't work for WaitDispatch Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C0-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant