Remove 'what' comments

When used, code comments should say _why_ we do something not _what_ we
do, the code already says what we do.

Remove 'what we do' style comments.
This commit is contained in:
Tobin Harding 2021-12-02 14:08:28 +11:00
parent b60db79a3b
commit d8e42d153e
1 changed files with 0 additions and 3 deletions

View File

@ -50,10 +50,7 @@ pub trait TapTweak {
impl TapTweak for UntweakedPublicKey { impl TapTweak for UntweakedPublicKey {
fn tap_tweak<C: Verification>(self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash>) -> TweakedPublicKey { fn tap_tweak<C: Verification>(self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash>) -> TweakedPublicKey {
// Compute the tweak
let tweak_value = TapTweakHash::from_key_and_tweak(self, merkle_root).into_inner(); let tweak_value = TapTweakHash::from_key_and_tweak(self, merkle_root).into_inner();
//Tweak the internal key by the tweak value
let mut output_key = self.clone(); let mut output_key = self.clone();
let parity = output_key.tweak_add_assign(&secp, &tweak_value).expect("Tap tweak failed"); let parity = output_key.tweak_add_assign(&secp, &tweak_value).expect("Tap tweak failed");
if self.tweak_add_check(&secp, &output_key, parity, tweak_value) { if self.tweak_add_check(&secp, &output_key, parity, tweak_value) {