We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cb17a1 commit b43962eCopy full SHA for b43962e
1 file changed
src/dynafed.rs
@@ -129,6 +129,15 @@ impl Params {
129
}
130
131
132
+ /// Get the elided_root. Is [None] for non-[Compact] params.
133
+ pub fn elided_root(&self) -> Option<&sha256::Midstate> {
134
+ match *self {
135
+ Params::Null => None,
136
+ Params::Compact { ref elided_root, ..} => Some(elided_root),
137
+ Params::Full { .. } => None,
138
+ }
139
140
+
141
/// Calculate the root of this [Params].
142
pub fn calculate_root(&self) -> sha256::Midstate {
143
fn serialize_hash<E: Encodable>(obj: &E) -> sha256d::Hash {
0 commit comments