Skip to content

Commit

Permalink
Merge pull request #2242 from AleoHQ/fix/doc
Browse files Browse the repository at this point in the history
Fix doc
  • Loading branch information
howardwu authored Dec 19, 2023
2 parents 9743017 + b06ded7 commit bbec2a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ledger/narwhal/batch-header/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ pub struct BatchHeader<N: Network> {
/// TODO (howardwu): For mainnet - Remove this version from the struct, we only use it here for backwards compatibility.
/// NOTE: You must keep the version encoding in the byte serialization, just remove it from the struct in memory.
version: u8,
/// The batch ID, defined as the hash of the round number, timestamp, transmission IDs, and previous batch certificate IDs.
/// The batch ID, defined as the hash of the author, round number, timestamp, transmission IDs,
/// previous batch certificate IDs, and last election certificate IDs.
batch_id: Field<N>,
/// The author of the batch.
author: Address<N>,
Expand Down
4 changes: 2 additions & 2 deletions ledger/narwhal/transmission-id/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pub enum TransmissionID<N: Network> {
}

impl<N: Network> From<PuzzleCommitment<N>> for TransmissionID<N> {
/// Converts the puzzle commitment into an transmission ID.
/// Converts the puzzle commitment into a transmission ID.
fn from(puzzle_commitment: PuzzleCommitment<N>) -> Self {
Self::Solution(puzzle_commitment)
}
}

impl<N: Network> From<&N::TransactionID> for TransmissionID<N> {
/// Converts the transaction ID into an transmission ID.
/// Converts the transaction ID into a transmission ID.
fn from(transaction_id: &N::TransactionID) -> Self {
Self::Transaction(*transaction_id)
}
Expand Down
8 changes: 4 additions & 4 deletions ledger/narwhal/transmission/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@ pub enum Transmission<N: Network> {
}

impl<N: Network> From<ProverSolution<N>> for Transmission<N> {
/// Converts the prover solution into an transmission.
/// Converts the prover solution into a transmission.
fn from(solution: ProverSolution<N>) -> Self {
Self::Solution(Data::Object(solution))
}
}

impl<N: Network> From<Transaction<N>> for Transmission<N> {
/// Converts the transaction into an transmission.
/// Converts the transaction into a transmission.
fn from(transaction: Transaction<N>) -> Self {
Self::Transaction(Data::Object(transaction))
}
}

impl<N: Network> From<Data<ProverSolution<N>>> for Transmission<N> {
/// Converts the prover solution into an transmission.
/// Converts the prover solution into a transmission.
fn from(solution: Data<ProverSolution<N>>) -> Self {
Self::Solution(solution)
}
}

impl<N: Network> From<Data<Transaction<N>>> for Transmission<N> {
/// Converts the transaction into an transmission.
/// Converts the transaction into a transmission.
fn from(transaction: Data<Transaction<N>>) -> Self {
Self::Transaction(transaction)
}
Expand Down

0 comments on commit bbec2a6

Please sign in to comment.