Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pin ack model by including success and error fields #35

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ impl From<gevulot::PinStatus> for PinStatus {
.map(|a| PinAck {
worker: a.worker,
block_height: a.block_height as i64,
success: a.success,
error: if a.error.is_empty() {
None
} else {
Some(a.error)
},
})
.collect(),
cid: Some(proto.cid),
Expand Down Expand Up @@ -550,6 +556,8 @@ pub struct PinAck {
pub worker: String,
#[serde(rename = "blockHeight")]
pub block_height: i64,
pub success: bool,
pub error: Option<String>,
}

#[derive(Serialize, Deserialize, Debug)]
Expand Down
Loading