V1.1 single gossip commitment (#10263)

automerge
This commit is contained in:
Tyera Eulberg
2020-05-26 22:16:46 -06:00
committed by GitHub
parent 768a5f2b40
commit fd5222ad21
8 changed files with 811 additions and 101 deletions

View File

@@ -37,6 +37,12 @@ impl CommitmentConfig {
}
}
pub fn single_gossip() -> Self {
Self {
commitment: CommitmentLevel::SingleGossip,
}
}
pub fn ok(self) -> Option<Self> {
if self == Self::default() {
None
@@ -46,11 +52,12 @@ impl CommitmentConfig {
}
}
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq)]
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[serde(rename_all = "camelCase")]
pub enum CommitmentLevel {
Max,
Recent,
Root,
Single,
SingleGossip,
}