Skip to content

Commit e779e5d

Browse files
committed
doc: Use add_tweak in example code
In preparation for removing the deprecated `tweak_add_check` use the new version `add_tweak` instead.
1 parent eedbd0b commit e779e5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,8 +1380,8 @@ impl XOnlyPublicKey {
13801380
/// let mut key_pair = KeyPair::new(&secp, &mut thread_rng());
13811381
/// let (mut public_key, _) = key_pair.x_only_public_key();
13821382
/// let original = public_key;
1383-
/// let parity = public_key.tweak_add_assign(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak");
1384-
/// assert!(original.tweak_add_check(&secp, &public_key, parity, tweak));
1383+
/// let (tweaked, parity) = public_key.add_tweak(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak");
1384+
/// assert!(original.tweak_add_check(&secp, &tweaked, parity, tweak));
13851385
/// # }
13861386
/// ```
13871387
pub fn tweak_add_check<V: Verification>(

0 commit comments

Comments
 (0)