Skip to content

Commit 84eb708

Browse files
committed
Add comment explaining DataVersion
1 parent 4e9dea8 commit 84eb708

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

anchor/common/ssv_types/src/consensus.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ impl TreeHash for BeaconRole {
227227
}
228228
}
229229

230+
/// Wrapper for [`ForkName`] to allow custom encoding/decoding used by SSV.
231+
///
232+
/// `ForkName` is encoded by starting from 0 for `Phase0` and increasing by 1 for each fork.
233+
/// This type encodes starting from 1.
230234
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, From, Into)]
231235
pub struct DataVersion(ForkName);
232236

0 commit comments

Comments
 (0)