mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
rust: upgrade model with new checkmessage requirements
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Christian Decker
parent
ba4e870a1c
commit
e70729b04b
@@ -388,7 +388,7 @@ message CheckmessageRequest {
|
|||||||
|
|
||||||
message CheckmessageResponse {
|
message CheckmessageResponse {
|
||||||
bool verified = 1;
|
bool verified = 1;
|
||||||
optional bytes pubkey = 2;
|
bytes pubkey = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CloseRequest {
|
message CloseRequest {
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ impl From<&responses::CheckmessageResponse> for pb::CheckmessageResponse {
|
|||||||
fn from(c: &responses::CheckmessageResponse) -> Self {
|
fn from(c: &responses::CheckmessageResponse) -> Self {
|
||||||
Self {
|
Self {
|
||||||
verified: c.verified.clone(), // Rule #2 for type boolean
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1441,8 +1441,8 @@ pub mod responses {
|
|||||||
pub struct CheckmessageResponse {
|
pub struct CheckmessageResponse {
|
||||||
#[serde(alias = "verified")]
|
#[serde(alias = "verified")]
|
||||||
pub verified: bool,
|
pub verified: bool,
|
||||||
#[serde(alias = "pubkey", skip_serializing_if = "Option::is_none")]
|
#[serde(alias = "pubkey")]
|
||||||
pub pubkey: Option<Pubkey>,
|
pub pubkey: Pubkey,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel
|
/// Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel
|
||||||
|
|||||||
Reference in New Issue
Block a user