Add a default commitment-level (#10935)
This commit is contained in:
parent
960f6f6f07
commit
119949d4d8
|
@ -1,17 +1,9 @@
|
|||
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Serialize, Deserialize, Default, Clone, Copy, Debug, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct CommitmentConfig {
|
||||
pub commitment: CommitmentLevel,
|
||||
}
|
||||
|
||||
impl Default for CommitmentConfig {
|
||||
fn default() -> Self {
|
||||
CommitmentConfig {
|
||||
commitment: CommitmentLevel::Max,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl CommitmentConfig {
|
||||
pub fn recent() -> Self {
|
||||
Self {
|
||||
|
@ -61,3 +53,9 @@ pub enum CommitmentLevel {
|
|||
Single,
|
||||
SingleGossip,
|
||||
}
|
||||
|
||||
impl Default for CommitmentLevel {
|
||||
fn default() -> Self {
|
||||
Self::Max
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue