fix some comments
Signed-off-by: geekvest <cuimoman@sohu.com>
This commit is contained in:
parent
b93397d472
commit
a6adfd845c
|
@ -251,7 +251,7 @@ impl serde::Serialize for ChildNumber {
|
||||||
/// Trait that allows possibly failable conversion from a type into a
|
/// Trait that allows possibly failable conversion from a type into a
|
||||||
/// derivation path
|
/// derivation path
|
||||||
pub trait IntoDerivationPath {
|
pub trait IntoDerivationPath {
|
||||||
/// Convers a given type into a [`DerivationPath`] with possible error
|
/// Converts a given type into a [`DerivationPath`] with possible error
|
||||||
fn into_derivation_path(self) -> Result<DerivationPath, Error>;
|
fn into_derivation_path(self) -> Result<DerivationPath, Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ impl From<Wtxid> for WitnessMerkleNode {
|
||||||
/// Bitcoin block header.
|
/// Bitcoin block header.
|
||||||
///
|
///
|
||||||
/// Contains all the block's information except the actual transactions, but
|
/// Contains all the block's information except the actual transactions, but
|
||||||
/// including a root of a [merkle tree] commiting to all transactions in the block.
|
/// including a root of a [merkle tree] committing to all transactions in the block.
|
||||||
///
|
///
|
||||||
/// [merkle tree]: https://en.wikipedia.org/wiki/Merkle_tree
|
/// [merkle tree]: https://en.wikipedia.org/wiki/Merkle_tree
|
||||||
///
|
///
|
||||||
|
|
|
@ -59,7 +59,7 @@ use crate::taproot::{LeafVersion, TapLeafHash, TapNodeHash};
|
||||||
/// ## Memory safety
|
/// ## Memory safety
|
||||||
///
|
///
|
||||||
/// The type is `#[repr(transparent)]` for internal purposes only!
|
/// The type is `#[repr(transparent)]` for internal purposes only!
|
||||||
/// No consumer crate may rely on the represenation of the struct!
|
/// No consumer crate may rely on the representation of the struct!
|
||||||
///
|
///
|
||||||
/// ## References
|
/// ## References
|
||||||
///
|
///
|
||||||
|
@ -441,7 +441,7 @@ impl Script {
|
||||||
/// In Bitcoin Core, there are two ways to count sigops, "accurate" and "legacy".
|
/// In Bitcoin Core, there are two ways to count sigops, "accurate" and "legacy".
|
||||||
/// This method uses "accurate" counting. This means that OP_CHECKMULTISIG and its
|
/// This method uses "accurate" counting. This means that OP_CHECKMULTISIG and its
|
||||||
/// verify variant count for N sigops where N is the number of pubkeys used in the
|
/// verify variant count for N sigops where N is the number of pubkeys used in the
|
||||||
/// multisig. However, it will count for 20 sigops if CHECKMULTISIG is not preceeded by an
|
/// multisig. However, it will count for 20 sigops if CHECKMULTISIG is not preceded by an
|
||||||
/// OP_PUSHNUM from 1 - 16 (this would be an invalid script)
|
/// OP_PUSHNUM from 1 - 16 (this would be an invalid script)
|
||||||
///
|
///
|
||||||
/// Bitcoin Core uses accurate counting for sigops contained within redeemScripts (P2SH)
|
/// Bitcoin Core uses accurate counting for sigops contained within redeemScripts (P2SH)
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl AsRef<core::num::ParseIntError> for ParseIntError {
|
||||||
fn as_ref(&self) -> &core::num::ParseIntError { &self.source }
|
fn as_ref(&self) -> &core::num::ParseIntError { &self.source }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Not strictly neccessary but serves as a lint - avoids weird behavior if someone accidentally
|
/// Not strictly necessary but serves as a lint - avoids weird behavior if someone accidentally
|
||||||
/// passes non-integer to the `parse()` function.
|
/// passes non-integer to the `parse()` function.
|
||||||
pub(crate) trait Integer:
|
pub(crate) trait Integer:
|
||||||
FromStr<Err = core::num::ParseIntError> + TryFrom<i8> + Sized
|
FromStr<Err = core::num::ParseIntError> + TryFrom<i8> + Sized
|
||||||
|
|
|
@ -43,7 +43,7 @@ impl TaprootMerkleBranch {
|
||||||
///
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
///
|
///
|
||||||
/// The function returns an error if the the number of bytes is not an integer multiple of 32 or
|
/// The function returns an error if the number of bytes is not an integer multiple of 32 or
|
||||||
/// if the number of hashes exceeds 128.
|
/// if the number of hashes exceeds 128.
|
||||||
pub fn decode(sl: &[u8]) -> Result<Self, TaprootError> {
|
pub fn decode(sl: &[u8]) -> Result<Self, TaprootError> {
|
||||||
if sl.len() % TAPROOT_CONTROL_NODE_SIZE != 0 {
|
if sl.len() % TAPROOT_CONTROL_NODE_SIZE != 0 {
|
||||||
|
|
Loading…
Reference in New Issue