doc: fix "lazy line continuations" in markdown

Rust nightly as of 2024-05-27 has a new lint which detects list items
which are continued by a non-indented line. Markdown treats these as
single list items, which they sometimes are, but sometimes we intended
them to be on a separate line.

Also changes the docs for `UntweakedKeypair::tap_tweak` because the
existing ones were overly technical and out-of-date.
This commit is contained in:
Andrew Poelstra 2024-05-27 12:50:24 +00:00
parent 24bb3aec4f
commit 45e0241267
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
4 changed files with 11 additions and 13 deletions

View File

@ -295,8 +295,8 @@ impl From<Network> for KnownHrp {
/// ``` /// ```
/// ///
/// 2. `Debug` on `Address<NetworkUnchecked>` does not produce clean address but address wrapped by /// 2. `Debug` on `Address<NetworkUnchecked>` does not produce clean address but address wrapped by
/// an indicator that its network has not been checked. This is to encourage programmer to properly /// an indicator that its network has not been checked. This is to encourage programmer to properly
/// check the network and use `Display` in user-facing context. /// check the network and use `Display` in user-facing context.
/// ///
/// ``` /// ```
/// # use std::str::FromStr; /// # use std::str::FromStr;

View File

@ -798,19 +798,16 @@ impl TapTweak for UntweakedKeypair {
type TweakedAux = TweakedKeypair; type TweakedAux = TweakedKeypair;
type TweakedKey = TweakedKeypair; type TweakedKey = TweakedKeypair;
/// Tweaks private and public keys within an untweaked [`Keypair`] with corresponding public key /// Applies a Taproot tweak to both keys within the keypair.
/// value and optional script tree merkle root.
/// ///
/// This is done by tweaking private key within the pair using the equation q = p + H(P|c), where /// If `merkle_root` is provided, produces a Taproot key that can be spent by any
/// * q is the tweaked private key /// of the script paths committed to by the root. If it is not provided, produces
/// * p is the internal private key /// a Taproot key which can [provably only be spent via
/// * H is the hash function /// keyspend](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-23).
/// * c is the commitment data
/// The public key is generated from a private key by multiplying with generator point, Q = qG.
/// ///
/// # Returns /// # Returns
/// ///
/// The tweaked key and its parity. /// The tweaked keypair.
fn tap_tweak<C: Verification>( fn tap_tweak<C: Verification>(
self, self,
secp: &Secp256k1<C>, secp: &Secp256k1<C>,

View File

@ -886,8 +886,8 @@ impl<R: Borrow<Transaction>> SighashCache<R> {
/// # Warning /// # Warning
/// ///
/// - Does NOT attempt to support OP_CODESEPARATOR. In general this would require evaluating /// - Does NOT attempt to support OP_CODESEPARATOR. In general this would require evaluating
/// `script_pubkey` to determine which separators get evaluated and which don't, which we don't /// `script_pubkey` to determine which separators get evaluated and which don't, which we don't
/// have the information to determine. /// have the information to determine.
/// - Does NOT handle the sighash single bug (see "Return type" section) /// - Does NOT handle the sighash single bug (see "Return type" section)
/// ///
/// # Returns /// # Returns

View File

@ -191,6 +191,7 @@ impl Decodable for MerkleBlock {
/// - uint256[] hashes in depth-first order (<= 32*N bytes) /// - uint256[] hashes in depth-first order (<= 32*N bytes)
/// - varint number of bytes of flag bits (1-3 bytes) /// - varint number of bytes of flag bits (1-3 bytes)
/// - byte[] flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits) /// - byte[] flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits)
///
/// The size constraints follow from this. /// The size constraints follow from this.
#[derive(PartialEq, Eq, Clone, Debug)] #[derive(PartialEq, Eq, Clone, Debug)]
pub struct PartialMerkleTree { pub struct PartialMerkleTree {