Merge rust-bitcoin/rust-bitcoin#2325: Fix some typos
04f3e939a7
Fix typos in test function names (GoodDaisy)ed47c35b4d
Fix typos in rustdocs (GoodDaisy) Pull request description: 1. Fix typos in rustdocs: hexidecimal -> hexadecimal lenght -> length 2. Fix typos in test function names: u256_wrapping_add_wraps_at_boundry -> u256_wrapping_add_wraps_at_boundary u256_wrapping_sub_wraps_at_boundry -> u256_wrapping_sub_wraps_at_boundary ACKs for top commit: apoelstra: ACK04f3e939a7
tcharding: ACK04f3e939a7
Tree-SHA512: 3b94db3c2af71ae2f941c2662b358ea6270b5ff5a784b0c57520cad3b03c6e14adba3ee86bee21b5ba5217e40b85eb006dba16293d3842d61646bacc52fac9fe
This commit is contained in:
commit
5e3d1295e0
|
@ -176,7 +176,7 @@ fn p2pk_public_key_compressed_key_returns_some() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn script_x_only_key() {
|
fn script_x_only_key() {
|
||||||
// Notice the "20" which prepends the keystr. That 20 is hexidecimal for "32". The Builder automatically adds the 32 opcode
|
// Notice the "20" which prepends the keystr. That 20 is hexadecimal for "32". The Builder automatically adds the 32 opcode
|
||||||
// to our script in order to give a heads up to the script compiler that it should add the next 32 bytes to the stack.
|
// to our script in order to give a heads up to the script compiler that it should add the next 32 bytes to the stack.
|
||||||
// From: https://github.com/bitcoin-core/btcdeb/blob/e8c2750c4a4702768c52d15640ed03bf744d2601/doc/tapscript-example.md?plain=1#L43
|
// From: https://github.com/bitcoin-core/btcdeb/blob/e8c2750c4a4702768c52d15640ed03bf744d2601/doc/tapscript-example.md?plain=1#L43
|
||||||
const KEYSTR: &str = "209997a497d964fc1a62885b05a51166a65a90df00492c8d7cf61d6accf54803be";
|
const KEYSTR: &str = "209997a497d964fc1a62885b05a51166a65a90df00492c8d7cf61d6accf54803be";
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ impl From<&Transaction> for Wtxid {
|
||||||
/// of the to-be-constructed transaction.
|
/// of the to-be-constructed transaction.
|
||||||
///
|
///
|
||||||
/// Note that lengths of the scripts and witness elements must be non-serialized, IOW *without* the
|
/// Note that lengths of the scripts and witness elements must be non-serialized, IOW *without* the
|
||||||
/// preceding compact size. The lenght of preceding compact size is computed and added inside the
|
/// preceding compact size. The length of preceding compact size is computed and added inside the
|
||||||
/// function for convenience.
|
/// function for convenience.
|
||||||
///
|
///
|
||||||
/// If you have the transaction already constructed (except for signatures) with a dummy value for
|
/// If you have the transaction already constructed (except for signatures) with a dummy value for
|
||||||
|
|
|
@ -1676,13 +1676,13 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn u256_wrapping_add_wraps_at_boundry() {
|
fn u256_wrapping_add_wraps_at_boundary() {
|
||||||
assert_eq!(U256::MAX.wrapping_add(U256::ONE), U256::ZERO);
|
assert_eq!(U256::MAX.wrapping_add(U256::ONE), U256::ZERO);
|
||||||
assert_eq!(U256::MAX.wrapping_add(U256::from(2_u8)), U256::ONE);
|
assert_eq!(U256::MAX.wrapping_add(U256::from(2_u8)), U256::ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn u256_wrapping_sub_wraps_at_boundry() {
|
fn u256_wrapping_sub_wraps_at_boundary() {
|
||||||
assert_eq!(U256::ZERO.wrapping_sub(U256::ONE), U256::MAX);
|
assert_eq!(U256::ZERO.wrapping_sub(U256::ONE), U256::MAX);
|
||||||
assert_eq!(U256::ONE.wrapping_sub(U256::from(2_u8)), U256::MAX);
|
assert_eq!(U256::ONE.wrapping_sub(U256::from(2_u8)), U256::MAX);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue