Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizdave97 committed Jul 11, 2023
1 parent 57ac125 commit d2a1f38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ismp/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@ pub type DispatchResult = Result<DispatchSuccess, DispatchError>;
pub trait IsmpModule {
/// Called by the message handler on a module, to notify module of a new POST request
/// the module may choose to respond immediately, or in a later block
/// If the module is a contract, it returns the gas consumed while executing
fn on_accept(&self, request: PostRequest) -> Result<Gas, Error>;

/// Called by the message handler on a module, to notify module of a response to a previously
/// sent out request
/// If the module is a contract, it returns the gas consumed while executing
fn on_response(&self, response: Response) -> Result<Gas, Error>;

/// Called by the message handler on a module, to notify module of requests that were previously
/// sent but have now timed-out
/// If the module is a contract, it returns the gas consumed while executing
fn on_timeout(&self, request: Request) -> Result<Gas, Error>;
}

0 comments on commit d2a1f38

Please sign in to comment.