From 675048e52ba387167c53990c2329af92cd8069c2 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 26 Mar 2021 09:49:27 +1300 Subject: [PATCH] Fix broken intra-doc links and lints --- zcash_client_backend/src/data_api/chain.rs | 7 +++---- zcash_client_backend/src/welding_rig.rs | 6 +++--- zcash_client_backend/src/zip321.rs | 2 +- zcash_primitives/src/constants/regtest.rs | 9 +++++---- zcash_primitives/src/memo.rs | 4 ++-- zcash_primitives/src/transaction/builder.rs | 2 +- zcash_primitives/src/transaction/components.rs | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/zcash_client_backend/src/data_api/chain.rs b/zcash_client_backend/src/data_api/chain.rs index 56fb1ba92..ec8c61c30 100644 --- a/zcash_client_backend/src/data_api/chain.rs +++ b/zcash_client_backend/src/data_api/chain.rs @@ -192,8 +192,9 @@ where /// caller is handling rollbacks. /// /// For brand-new light client databases, this function starts scanning from the Sapling -/// activation height. This height can be fast-forwarded to a more recent block by calling -/// [`init_blocks_table`] before this function. +/// activation height. This height can be fast-forwarded to a more recent block by +/// initializing the client database with a starting block (for example, calling +/// `init_blocks_table` before this function if using `zcash_client_sqlite`). /// /// Scanned blocks are required to be height-sequential. If a block is missing from the /// cache, an error will be returned with kind [`ChainInvalid::BlockHeightDiscontinuity`]. @@ -235,8 +236,6 @@ where /// # Ok(()) /// # } /// ``` -/// -/// [`init_blocks_table`]: crate::init::init_blocks_table pub fn scan_cached_blocks( params: &P, cache: &C, diff --git a/zcash_client_backend/src/welding_rig.rs b/zcash_client_backend/src/welding_rig.rs index 428875849..404e00fc0 100644 --- a/zcash_client_backend/src/welding_rig.rs +++ b/zcash_client_backend/src/welding_rig.rs @@ -152,11 +152,11 @@ impl ScanningKey for SaplingIvk { /// The implementation of [`ScanningKey`] may either support or omit the computation of /// the nullifiers for received notes; the implementation for [`ExtendedFullViewingKey`] /// will derive the nullifiers for received notes and return them as part of the resulting -/// [`WalletShieldedOutput`]s, whereas since the implementation for [`SaplingIvk`] cannot -/// do so and it will return the unit value in those outputs instead. +/// [`WalletShieldedOutput`]s, whereas the implementation for [`SaplingIvk`] cannot +/// do so and will return the unit value in those outputs instead. /// /// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey -/// [`SaplingIvk`]: zcash_primitives::SaplingIvk +/// [`SaplingIvk`]: zcash_primitives::primitives::SaplingIvk /// [`CompactBlock`]: crate::proto::compact_formats::CompactBlock /// [`ScanningKey`]: self::ScanningKey /// [`CommitmentTree`]: zcash_primitives::merkle_tree::CommitmentTree diff --git a/zcash_client_backend/src/zip321.rs b/zcash_client_backend/src/zip321.rs index 0e1c32b9f..a9ff38d96 100644 --- a/zcash_client_backend/src/zip321.rs +++ b/zcash_client_backend/src/zip321.rs @@ -462,7 +462,7 @@ mod parse { Ok(payment) } - /// Parser that consumes the leading "zcash:[address]" from + /// Parser that consumes the leading "zcash:\[address\]" from /// a ZIP 321 URI. pub fn lead_addr<'a, P: consensus::Parameters>( params: &'a P, diff --git a/zcash_primitives/src/constants/regtest.rs b/zcash_primitives/src/constants/regtest.rs index 9baf14fbe..9abd546ce 100644 --- a/zcash_primitives/src/constants/regtest.rs +++ b/zcash_primitives/src/constants/regtest.rs @@ -3,7 +3,8 @@ //! `regtest` is a `zcashd`-specific environment used for local testing. They mostly reuse //! the testnet constants. //! These constants are defined in [the `zcashd` codebase]. -//! [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L482-L496 +//! +//! [the `zcashd` codebase]: /// The regtest cointype reuses the testnet cointype pub const COIN_TYPE: u32 = 1; @@ -13,7 +14,7 @@ pub const COIN_TYPE: u32 = 1; /// It is defined in [the `zcashd` codebase]. /// /// [`ExtendedSpendingKey`]: crate::zip32::ExtendedSpendingKey -/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L496 +/// [the `zcashd` codebase]: pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest"; /// The HRP for a Bech32-encoded regtest [`ExtendedFullViewingKey`]. @@ -21,7 +22,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest /// It is defined in [the `zcashd` codebase]. /// /// [`ExtendedFullViewingKey`]: crate::zip32::ExtendedFullViewingKey -/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L494 +/// [the `zcashd` codebase]: pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling"; /// The HRP for a Bech32-encoded regtest [`PaymentAddress`]. @@ -29,7 +30,7 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling"; /// It is defined in [the `zcashd` codebase]. /// /// [`PaymentAddress`]: crate::primitives::PaymentAddress -/// [the `zcashd` codebase]: https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L493 +/// [the `zcashd` codebase]: pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zregtestsapling"; /// The prefix for a Base58Check-encoded regtest [`TransparentAddress::PublicKey`]. diff --git a/zcash_primitives/src/memo.rs b/zcash_primitives/src/memo.rs index 6ec32072a..7f8b38597 100644 --- a/zcash_primitives/src/memo.rs +++ b/zcash_primitives/src/memo.rs @@ -9,8 +9,8 @@ use std::str; /// Format a byte array as a colon-delimited hex string. /// -/// Source: https://github.com/tendermint/signatory -/// License: MIT / Apache 2.0 +/// - Source: +/// - License: MIT / Apache 2.0 fn fmt_colon_delimited_hex(f: &mut fmt::Formatter<'_>, bytes: B) -> fmt::Result where B: AsRef<[u8]>, diff --git a/zcash_primitives/src/transaction/builder.rs b/zcash_primitives/src/transaction/builder.rs index a0caf6a58..d8d57fb06 100644 --- a/zcash_primitives/src/transaction/builder.rs +++ b/zcash_primitives/src/transaction/builder.rs @@ -49,7 +49,7 @@ use crate::prover::mock::MockTxProver; const DEFAULT_TX_EXPIRY_DELTA: u32 = 20; /// If there are any shielded inputs, always have at least two shielded outputs, padding -/// with dummy outputs if necessary. See https://github.com/zcash/zcash/issues/3615 +/// with dummy outputs if necessary. See . const MIN_SHIELDED_OUTPUTS: usize = 2; #[derive(Debug, PartialEq)] diff --git a/zcash_primitives/src/transaction/components.rs b/zcash_primitives/src/transaction/components.rs index f7ef18d5d..ea592c856 100644 --- a/zcash_primitives/src/transaction/components.rs +++ b/zcash_primitives/src/transaction/components.rs @@ -142,9 +142,9 @@ pub struct TzeIn { pub witness: tze::Witness, } -/// Transaction encoding and decoding functions conforming to ZIP-222 +/// Transaction encoding and decoding functions conforming to [ZIP 222]. /// -/// https://zips.z.cash/zip-0222#encoding-in-transactions +/// [ZIP 222]: https://zips.z.cash/zip-0222#encoding-in-transactions #[cfg(feature = "zfuture")] impl TzeIn { /// Convenience constructor