From d1bcc3292e7b9969ea5cc83b04f513c5fe1d5626 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 25 Oct 2022 22:14:21 +1000 Subject: [PATCH] Resolve a few doc warnings about unquoted HTML tags (#5477) --- zebra-chain/src/orchard/shielded_data.rs | 2 +- zebra-chain/src/serialization/zcash_deserialize.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zebra-chain/src/orchard/shielded_data.rs b/zebra-chain/src/orchard/shielded_data.rs index e9a02eab1..6b3d8a255 100644 --- a/zebra-chain/src/orchard/shielded_data.rs +++ b/zebra-chain/src/orchard/shielded_data.rs @@ -165,7 +165,7 @@ impl AuthorizedAction { /// [ps]: pub const ACTION_SIZE: u64 = 5 * 32 + 580 + 80; -/// The size of a single Signature +/// The size of a single `Signature`. /// /// Each Signature is 64 bytes. /// [7.1 Transaction Encoding and Consensus][ps] diff --git a/zebra-chain/src/serialization/zcash_deserialize.rs b/zebra-chain/src/serialization/zcash_deserialize.rs index 45b4df061..3f8444567 100644 --- a/zebra-chain/src/serialization/zcash_deserialize.rs +++ b/zebra-chain/src/serialization/zcash_deserialize.rs @@ -41,7 +41,7 @@ impl ZcashDeserialize for AtLeastOne directly instead of using the blanket Vec implementation +/// Implement ZcashDeserialize for `Vec` directly instead of using the blanket Vec implementation /// /// This allows us to optimize the inner loop into a single call to `read_exact()` /// Note that we don't implement TrustedPreallocate for u8. @@ -158,14 +158,14 @@ impl ZcashDeserializeInto for R { } } -/// Blind preallocation of a Vec is based on a bounded length. This is in contrast -/// to blind preallocation of a generic Vec, which is a DOS vector. +/// Blind preallocation of a `Vec` is based on a bounded length. This is in contrast +/// to blind preallocation of a generic `Vec`, which is a DOS vector. /// -/// The max_allocation() function provides a loose upper bound on the size of the Vec +/// The max_allocation() function provides a loose upper bound on the size of the `Vec` /// which can possibly be received from an honest peer. If this limit is too low, Zebra may reject valid messages. /// In the worst case, setting the lower bound too low could cause Zebra to fall out of consensus by rejecting all messages containing a valid block. pub trait TrustedPreallocate { - /// Provides a ***loose upper bound*** on the size of the Vec + /// Provides a ***loose upper bound*** on the size of the `Vec` /// which can possibly be received from an honest peer. fn max_allocation() -> u64; } @@ -182,6 +182,6 @@ where /// The length of the longest valid `Vec` that can be received over the network /// /// It takes 5 bytes to encode a CompactSize representing any number netween 2^16 and (2^32 - 1) -/// MAX_PROTOCOL_MESSAGE_LEN is ~2^21, so the largest Vec that can be received from an honest peer is +/// MAX_PROTOCOL_MESSAGE_LEN is ~2^21, so the largest `Vec` that can be received from an honest peer is /// (MAX_PROTOCOL_MESSAGE_LEN - 5); pub(crate) const MAX_U8_ALLOCATION: usize = MAX_PROTOCOL_MESSAGE_LEN - 5;