Skip to content

Commit

Permalink
Merge pull request #35 from gevulotnetwork/fix/pin-ack-model
Browse files Browse the repository at this point in the history
fix pin ack model by including success and error fields
  • Loading branch information
trusch authored Dec 13, 2024
2 parents f1a56d4 + 460a16d commit e409464
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit e409464

Please sign in to comment.