/// Waits for `MigrationStatus` to change from pending and returns a new status.
/// Panics if reaches deadline height and state is still `Pending`.
Waits for `MigrationStatus` to change from pending and returns a new status.
Panics if reaches deadline height and state is still `Pending`.
Waits for ` MigrationStatus ` to change from pending and returns a new status . Panics if reaches deadline height and state is still ` Pending ` .
fn wait_while_pending(
    testkit: &mut TestKit,
    deadline_height: Height,
    request: MigrationRequest,
) -> MigrationState {
    let api = testkit.api();
    while testkit.height() <= deadline_height.next() {
        testkit.create_block();
        let migration_state = migration_state(&api, request.clone());
        match migration_state.inner {
            AsyncEventState::Pending => {
                // Not ready yet.
            }
            _ => {
                return migration_state;
            }
        }
    }
    panic!("Migration is pending after reaching deadline height");
}
fn wait_while_pending ( testkit : & mut TestKit , deadline_height : Height , request : MigrationRequest , ) -> MigrationState { let api = testkit . api ( ) ; while testkit . height ( ) <= deadline_height . next ( ) { testkit . create_block ( ) ; let migration_state = migration_state ( & api , request . clone ( ) ) ; match migration_state . inner { AsyncEventState :: Pending => { // Not ready yet. } _ => { return migration_state ; } } } panic ! ( " " ) ; }
Waits for `MigrationStatus` to change from pending and returns a new status.
Waits for ` MigrationStatus ` to change from pending and returns a new status .
testkit
&mut TestKit
deadline_height
Height
request
MigrationRequest