Trait gear_core_processor::common::JournalHandler

source ·
pub trait JournalHandler {
Show 19 methods // Required methods fn message_dispatched( &mut self, message_id: MessageId, source: ProgramId, outcome: DispatchOutcome, ); fn gas_burned(&mut self, message_id: MessageId, amount: u64); fn exit_dispatch( &mut self, id_exited: ProgramId, value_destination: ProgramId, ); fn message_consumed(&mut self, message_id: MessageId); fn send_dispatch( &mut self, message_id: MessageId, dispatch: Dispatch, delay: u32, reservation: Option<ReservationId>, ); fn wait_dispatch( &mut self, dispatch: StoredDispatch, duration: Option<u32>, waited_type: MessageWaitedType, ); fn wake_message( &mut self, message_id: MessageId, program_id: ProgramId, awakening_id: MessageId, delay: u32, ); fn update_pages_data( &mut self, program_id: ProgramId, pages_data: BTreeMap<GearPage, PageBuf>, ); fn update_allocations( &mut self, program_id: ProgramId, allocations: IntervalsTree<WasmPage>, ); fn send_value( &mut self, from: ProgramId, to: Option<ProgramId>, value: u128, ); fn store_new_programs( &mut self, program_id: ProgramId, code_id: CodeId, candidates: Vec<(MessageId, ProgramId)>, ); fn stop_processing(&mut self, dispatch: StoredDispatch, gas_burned: u64); fn reserve_gas( &mut self, message_id: MessageId, reservation_id: ReservationId, program_id: ProgramId, amount: u64, bn: u32, ); fn unreserve_gas( &mut self, reservation_id: ReservationId, program_id: ProgramId, expiration: u32, ); fn update_gas_reservation( &mut self, program_id: ProgramId, reserver: GasReserver, ); fn system_reserve_gas(&mut self, message_id: MessageId, amount: u64); fn system_unreserve_gas(&mut self, message_id: MessageId); fn send_signal( &mut self, message_id: MessageId, destination: ProgramId, code: SignalCode, ); fn reply_deposit( &mut self, message_id: MessageId, future_reply_id: MessageId, amount: u64, );
}
Expand description

Journal handler.

Something that can update state.

Required Methods§

source

fn message_dispatched( &mut self, message_id: MessageId, source: ProgramId, outcome: DispatchOutcome, )

Process message dispatch.

source

fn gas_burned(&mut self, message_id: MessageId, amount: u64)

Process gas burned.

source

fn exit_dispatch(&mut self, id_exited: ProgramId, value_destination: ProgramId)

Process exit dispatch.

source

fn message_consumed(&mut self, message_id: MessageId)

Process message consumed.

source

fn send_dispatch( &mut self, message_id: MessageId, dispatch: Dispatch, delay: u32, reservation: Option<ReservationId>, )

Process send dispatch.

source

fn wait_dispatch( &mut self, dispatch: StoredDispatch, duration: Option<u32>, waited_type: MessageWaitedType, )

Process send message.

source

fn wake_message( &mut self, message_id: MessageId, program_id: ProgramId, awakening_id: MessageId, delay: u32, )

Process send message.

source

fn update_pages_data( &mut self, program_id: ProgramId, pages_data: BTreeMap<GearPage, PageBuf>, )

Process page update.

source

fn update_allocations( &mut self, program_id: ProgramId, allocations: IntervalsTree<WasmPage>, )

source

fn send_value(&mut self, from: ProgramId, to: Option<ProgramId>, value: u128)

Send value.

source

fn store_new_programs( &mut self, program_id: ProgramId, code_id: CodeId, candidates: Vec<(MessageId, ProgramId)>, )

Store new programs in storage.

Program ids are ids of potential (planned to be initialized) programs.

source

fn stop_processing(&mut self, dispatch: StoredDispatch, gas_burned: u64)

Stop processing queue.

Pushes StoredDispatch back to the top of the queue and decreases gas allowance.

source

fn reserve_gas( &mut self, message_id: MessageId, reservation_id: ReservationId, program_id: ProgramId, amount: u64, bn: u32, )

Reserve gas.

source

fn unreserve_gas( &mut self, reservation_id: ReservationId, program_id: ProgramId, expiration: u32, )

Unreserve gas.

source

fn update_gas_reservation( &mut self, program_id: ProgramId, reserver: GasReserver, )

Update gas reservations.

source

fn system_reserve_gas(&mut self, message_id: MessageId, amount: u64)

Do system reservation.

source

fn system_unreserve_gas(&mut self, message_id: MessageId)

Do system unreservation.

source

fn send_signal( &mut self, message_id: MessageId, destination: ProgramId, code: SignalCode, )

Send system signal.

source

fn reply_deposit( &mut self, message_id: MessageId, future_reply_id: MessageId, amount: u64, )

Create deposit for future reply.

Implementors§