schema: minconf should be an integer (u32) not a float (number)

This commit is contained in:
Christian Decker 2022-07-01 13:52:25 +02:00 committed by Rusty Russell
parent 18a9eb2feb
commit ca8c46c286
4 changed files with 4 additions and 4 deletions

View file

@ -1145,7 +1145,7 @@ message FundchannelRequest {
AmountOrAll amount = 1;
optional Feerate feerate = 2;
optional bool announce = 3;
optional double minconf = 10;
optional uint32 minconf = 10;
optional Amount push_msat = 5;
optional string close_to = 6;
optional Amount request_amt = 7;

View file

@ -1453,7 +1453,7 @@ impl From<&pb::FundchannelRequest> for requests::FundchannelRequest {
amount: c.amount.as_ref().unwrap().into(), // Rule #1 for type msat_or_all
feerate: c.feerate.as_ref().map(|a| a.into()), // Rule #1 for type feerate?
announce: c.announce.clone(), // Rule #1 for type boolean?
minconf: c.minconf.clone(), // Rule #1 for type number?
minconf: c.minconf.clone(), // Rule #1 for type u32?
push_msat: c.push_msat.as_ref().map(|a| a.into()), // Rule #1 for type msat?
close_to: c.close_to.clone(), // Rule #1 for type string?
request_amt: c.request_amt.as_ref().map(|a| a.into()), // Rule #1 for type msat?

View file

@ -713,7 +713,7 @@ pub mod requests {
#[serde(alias = "announce", skip_serializing_if = "Option::is_none")]
pub announce: Option<bool>,
#[serde(alias = "minconf", skip_serializing_if = "Option::is_none")]
pub minconf: Option<f64>,
pub minconf: Option<u32>,
#[serde(alias = "push_msat", skip_serializing_if = "Option::is_none")]
pub push_msat: Option<Amount>,
#[serde(alias = "close_to", skip_serializing_if = "Option::is_none")]

View file

@ -21,7 +21,7 @@
"type": "boolean"
},
"minconf": {
"type": "number"
"type": "u32"
},
"push_msat": {
"type": "msat"