Improve docs on tweak_add_check method
It is not immediately apparent what 'err == 1' means, one must determine that the FFI function call returns 1 for success. We can help readers of the code by adding a 'Return' section to the method documentation. Add trailing full stop to method docs initial line also.
This commit is contained in:
parent
fbc64c7725
commit
ede114fb1a
|
@ -867,7 +867,7 @@ impl XOnlyPublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verify that a tweak produced by `tweak_add_assign` was computed correctly
|
/// Verify that a tweak produced by `tweak_add_assign` was computed correctly.
|
||||||
///
|
///
|
||||||
/// Should be called on the original untweaked key. Takes the tweaked key and
|
/// Should be called on the original untweaked key. Takes the tweaked key and
|
||||||
/// output parity from `tweak_add_assign` as input.
|
/// output parity from `tweak_add_assign` as input.
|
||||||
|
@ -876,6 +876,9 @@ impl XOnlyPublicKey {
|
||||||
/// and checking equality. However, in future this API will support batch
|
/// and checking equality. However, in future this API will support batch
|
||||||
/// verification, which is significantly faster, so it is wise to design
|
/// verification, which is significantly faster, so it is wise to design
|
||||||
/// protocols with this in mind.
|
/// protocols with this in mind.
|
||||||
|
///
|
||||||
|
/// # Return
|
||||||
|
/// True if tweak and check is successful, false otherwise.
|
||||||
pub fn tweak_add_check<V: Verification>(
|
pub fn tweak_add_check<V: Verification>(
|
||||||
&self,
|
&self,
|
||||||
secp: &Secp256k1<V>,
|
secp: &Secp256k1<V>,
|
||||||
|
|
Loading…
Reference in New Issue