Improve documentation of `WitnessVersion`

Attempt to improve the rustdocs for `WitnessVersion` in line with
review comments from a previous patch.
This commit is contained in:
Tobin Harding 2021-11-19 09:35:14 +11:00
parent eb8278fd2e
commit 804a38cb67
1 changed files with 6 additions and 4 deletions

View File

@ -177,11 +177,13 @@ impl FromStr for AddressType {
} }
} }
/// Version of the witness program: first byte of `scriptPubkey` in transaction output for /// Version of the witness program.
/// transactions starting with opcodes ranging from 0 to 16 (inclusive).
/// ///
/// Helps to limit possible version of the witness according to the specification; if a plain `u8` /// Helps limit possible versions of the witness according to the specification. If a plain `u8`
/// type was be used instead it would mean that version may be > 16, which is incorrect. /// type was used instead it would mean that the version may be > 16, which would be incorrect.
///
/// First byte of `scriptPubkey` in transaction output for transactions starting with opcodes
/// ranging from 0 to 16 (inclusive).
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u8)] #[repr(u8)]
pub enum WitnessVersion { pub enum WitnessVersion {