Skip to content

Commit

Permalink
update optimistic block imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Oct 23, 2024
1 parent 4bb4ca0 commit 28a62d9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
12 changes: 12 additions & 0 deletions crates/astria-core/src/generated/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use bytes::Bytes;

use crate::{
generated::sequencerblock::v1alpha1 as raw,
generated::sequencerblock::v1::optimisticblock::v1alpha1 as raw,
Protobuf,
};

Expand Down
16 changes: 3 additions & 13 deletions crates/astria-sequencer/src/grpc/optimistic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
};

use astria_core::{
generated::sequencerblock::v1alpha1::{
generated::sequencerblock::v1::optimisticblock::v1alpha1::{
optimistic_block_service_server::OptimisticBlockService,
GetBlockCommitmentStreamRequest,
GetBlockCommitmentStreamResponse,
Expand Down Expand Up @@ -88,12 +88,7 @@ impl OptimisticBlockService for OptimisticBlockServer {
block: Some(raw_filtered_optimistic_block),
};

match tx
.send(Ok(
get_optimistic_block_stream_response,
))
.await
{
match tx.send(Ok(get_optimistic_block_stream_response)).await {
Ok(()) => {
debug!("sent optimistic block");
}
Expand Down Expand Up @@ -136,12 +131,7 @@ impl OptimisticBlockService for OptimisticBlockServer {
commitment: Some(sequencer_block_commit.to_raw()),
};

match tx
.send(Ok(
get_block_commitment_stream_response,
))
.await
{
match tx.send(Ok(get_block_commitment_stream_response)).await {
Ok(()) => {
debug!("sent block commitment");
}
Expand Down
6 changes: 3 additions & 3 deletions crates/astria-sequencer/src/sequencer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use astria_core::{
generated::sequencerblock::{
v1::sequencer_service_server::SequencerServiceServer,
v1alpha1::optimistic_block_service_server::OptimisticBlockServiceServer,
generated::sequencerblock::v1::{
optimisticblock::v1alpha1::optimistic_block_service_server::OptimisticBlockServiceServer,
sequencer_service_server::SequencerServiceServer,
},
sequencerblock::{
v1::SequencerBlock,
Expand Down

0 comments on commit 28a62d9

Please sign in to comment.