-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move schedule handler to runtime common and abstract it
- Loading branch information
Showing
6 changed files
with
68 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
use gear_core::{ids::ProgramId, tasks::TaskHandler}; | ||
use gprimitives::{ActorId, CodeId, MessageId, ReservationId}; | ||
|
||
use crate::{state::Storage, InBlockTransitions}; | ||
|
||
pub struct Handler<'a, S: Storage> { | ||
pub in_block_transitions: &'a mut InBlockTransitions, | ||
pub storage: &'a S, | ||
} | ||
|
||
impl<'a, S: Storage> TaskHandler<ActorId> for Handler<'a, S> { | ||
fn remove_from_mailbox(&mut self, _user_id: ActorId, _message_id: MessageId) -> u64 { | ||
unimplemented!("TODO (breathx)") | ||
} | ||
fn remove_from_waitlist(&mut self, _program_id: ProgramId, _message_id: MessageId) -> u64 { | ||
unimplemented!("TODO (breathx)") | ||
} | ||
fn send_dispatch(&mut self, _stashed_message_id: MessageId) -> u64 { | ||
unimplemented!("TODO (breathx)") | ||
} | ||
fn send_user_message(&mut self, _stashed_message_id: MessageId, _to_mailbox: bool) -> u64 { | ||
unimplemented!("TODO (breathx)") | ||
} | ||
fn wake_message(&mut self, _program_id: ProgramId, _message_id: MessageId) -> u64 { | ||
// TODO (breathx): consider deprecation of delayed wakes + non-concrete waits. | ||
unimplemented!("TODO (breathx)") | ||
} | ||
|
||
/* Deprecated APIs */ | ||
fn pause_program(&mut self, _: ProgramId) -> u64 { | ||
unreachable!("deprecated") | ||
} | ||
fn remove_code(&mut self, _: CodeId) -> u64 { | ||
unreachable!("deprecated") | ||
} | ||
fn remove_gas_reservation(&mut self, _: ProgramId, _: ReservationId) -> u64 { | ||
unreachable!("deprecated") | ||
} | ||
fn remove_paused_program(&mut self, _: ProgramId) -> u64 { | ||
unreachable!("deprecated") | ||
} | ||
fn remove_resume_session(&mut self, _: u32) -> u64 { | ||
unreachable!("deprecated") | ||
} | ||
} |