Skip to content

Commit

Permalink
dev: refactor trait bounds of seqeuncer
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Bajpai authored and Harsh Bajpai committed Nov 1, 2023
1 parent fd06836 commit 8fbb186
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/sequencer/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use starknet_api::core::ContractAddress;
pub struct Sequencer<S>
where
for<'any> &'any mut S: State + StateReader,
S: DumpLoad + Clone,
{
pub block_context: BlockContext,
pub state: S,
Expand All @@ -38,7 +37,6 @@ where
impl<S> Sequencer<S>
where
for<'any> &'any mut S: State + StateReader,
S: DumpLoad + Clone,
{
/// Creates a new Sequencer instance.
#[inline]
Expand All @@ -49,7 +47,13 @@ where
state,
}
}
}

impl<S> Sequencer<S>
where
S: DumpLoad + Clone,
for<'any> &'any mut S: State + StateReader,
{
pub fn dump_state_to_file(&self, file_path: &Path) -> Result<(), SerializationError> {
self.state.clone().dump_state_to_file(file_path)
}
Expand All @@ -66,7 +70,6 @@ where
impl<S> Execution for Sequencer<S>
where
for<'any> &'any mut S: State + StateReader + Committer<S>,
S: DumpLoad + Clone,
{
/// Executes the provided transaction on the current state and leads to a commitment of the
/// cached state in the case of success. Reversion of the transaction leads to a discarding
Expand Down

0 comments on commit 8fbb186

Please sign in to comment.