doc: Use add_tweak in example code
In preparation for removing the deprecated `tweak_add_check` use the new version `add_tweak` instead.
This commit is contained in:
parent
eedbd0b7e4
commit
e779e5dc05
|
@ -1380,8 +1380,8 @@ impl XOnlyPublicKey {
|
||||||
/// let mut key_pair = KeyPair::new(&secp, &mut thread_rng());
|
/// let mut key_pair = KeyPair::new(&secp, &mut thread_rng());
|
||||||
/// let (mut public_key, _) = key_pair.x_only_public_key();
|
/// let (mut public_key, _) = key_pair.x_only_public_key();
|
||||||
/// let original = public_key;
|
/// let original = public_key;
|
||||||
/// let parity = public_key.tweak_add_assign(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak");
|
/// let (tweaked, parity) = public_key.add_tweak(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak");
|
||||||
/// assert!(original.tweak_add_check(&secp, &public_key, parity, tweak));
|
/// assert!(original.tweak_add_check(&secp, &tweaked, parity, tweak));
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn tweak_add_check<V: Verification>(
|
pub fn tweak_add_check<V: Verification>(
|
||||||
|
|
Loading…
Reference in New Issue