Skip to content

Commit

Permalink
rust: upgrade model with new checkmessage requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Jul 18, 2022
1 parent 8d695ab commit fe8c3de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cln-grpc/proto/node.proto
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ message CheckmessageRequest {

message CheckmessageResponse {
bool verified = 1;
optional bytes pubkey = 2;
bytes pubkey = 2;
}

message CloseRequest {
Expand Down
2 changes: 1 addition & 1 deletion cln-grpc/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl From<&responses::CheckmessageResponse> for pb::CheckmessageResponse {
fn from(c: &responses::CheckmessageResponse) -> Self {
Self {
verified: c.verified.clone(), // Rule #2 for type boolean
pubkey: c.pubkey.as_ref().map(|v| v.to_vec()), // Rule #2 for type pubkey?
pubkey: c.pubkey.to_vec(), // Rule #2 for type pubkey
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cln-rpc/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,8 @@ pub mod responses {
pub struct CheckmessageResponse {
#[serde(alias = "verified")]
pub verified: bool,
#[serde(alias = "pubkey", skip_serializing_if = "Option::is_none")]
pub pubkey: Option<Pubkey>,
#[serde(alias = "pubkey")]
pub pubkey: Pubkey,
}

/// Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel
Expand Down

0 comments on commit fe8c3de

Please sign in to comment.