Skip to content

Commit c8bb6f1

Browse files
committed
commit: small fixes
1 parent 277b4fa commit c8bb6f1

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

commit_verify/derive/src/params.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub enum StrategyAttr {
4545
ConcealStrict,
4646
Transparent,
4747
Merklize,
48+
// TODO: Add Hash strategy
4849
}
4950

5051
impl TryFrom<&Path> for StrategyAttr {

commit_verify/src/id.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl CommitEngine {
110110

111111
pub fn commit_to_hash<T: CommitEncode<CommitmentId = StrictHash> + StrictType>(
112112
&mut self,
113-
value: T,
113+
value: &T,
114114
) {
115115
let fqn = commitment_fqn::<T>();
116116
self.layout
@@ -209,9 +209,6 @@ impl CommitEngine {
209209
pub fn finish_layout(self) -> (Sha256, TinyVec<CommitStep>) { (self.hasher, self.layout) }
210210
}
211211

212-
/// Prepares the data to the *consensus commit* procedure by first running
213-
/// necessary conceal and merklization procedures, and them performing strict
214-
/// encoding for the resulted data.
215212
pub trait CommitEncode {
216213
/// Type of the resulting commitment.
217214
type CommitmentId: CommitmentId;
@@ -263,7 +260,7 @@ where T: CommitEncode + StrictDumb
263260

264261
/// High-level API used in client-side validation for producing a single
265262
/// commitment to the data, which includes running all necessary procedures like
266-
/// concealment with [`crate::Conceal`], merklization, strict encoding,
263+
/// concealment with [`Conceal`], merklization, strict encoding,
267264
/// wrapped into [`CommitEncode`], followed by the actual commitment to its
268265
/// output.
269266
///
@@ -291,7 +288,7 @@ impl<T: CommitEncode> CommitId for T {
291288

292289
#[derive(Wrapper, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, From)]
293290
#[wrapper(Deref, BorrowSlice, Display, FromStr, Hex, Index, RangeOps)]
294-
#[derive(StrictDumb, strict_encoding::StrictType, StrictEncode, StrictDecode)]
291+
#[derive(StrictDumb, StrictType, StrictEncode, StrictDecode)]
295292
#[strict_type(lib = LIB_NAME_COMMIT_VERIFY)]
296293
#[cfg_attr(
297294
feature = "serde",

commit_verify/src/merkle.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ impl MerkleHash {
202202

203203
pub trait MerkleLeaves {
204204
type Leaf: CommitId<CommitmentId = MerkleHash>;
205+
// TODO: Remove associated type
205206
type LeafIter<'tmp>: ExactSizeIterator<Item = Self::Leaf>
206207
where Self: 'tmp;
207208

0 commit comments

Comments
 (0)