Skip to content

Commit d78bc0f

Browse files
committed
Add ensure finality
1 parent 56658c8 commit d78bc0f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

core/node/da_clients/src/eigen/client.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,18 @@ impl DataAvailabilityClient for EigenDAClient {
8484
&self,
8585
dispatch_request_id: String,
8686
) -> Result<Option<FinalityResponse>, DAError> {
87-
// TODO: return a quick confirmation in `dispatch_blob` and await here
88-
Ok(Some(FinalityResponse {
89-
blob_id: dispatch_request_id,
90-
}))
87+
let inclusion_data = self
88+
.client
89+
.get_inclusion_data(&dispatch_request_id)
90+
.await
91+
.map_err(to_retriable_da_error)?;
92+
if let Some(_) = inclusion_data {
93+
Ok(Some(FinalityResponse {
94+
blob_id: dispatch_request_id,
95+
}))
96+
} else {
97+
Ok(None)
98+
}
9199
}
92100

93101
async fn get_inclusion_data(&self, blob_id: &str) -> Result<Option<InclusionData>, DAError> {

0 commit comments

Comments
 (0)