Skip to content

Commit 2bec6d9

Browse files
committed
Merge #38: Mention in minisketch.h that adding the same element a second time removes it again
b3316f2 Mention in minisketch.h that adding the same element a second time removes it again (practicalswift) Pull request description: Mention in `minisketch.h` that adding the same element a second time removes it again. Context: bitcoin/bitcoin#21859 (comment) ACKs for top commit: sipa: utACK b3316f2 gmaxwell: ACK b3316f2 Tree-SHA512: b887389fe519044457d550106b460d1204c1280b510442fc57b08556bdbf9fd07b532117416dc9cdb0b54357ffcb260cbd42fb4292bb6e9c51dc7a7d8c2e3dc0
2 parents 5424aa2 + b3316f2 commit 2bec6d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/minisketch.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ void minisketch_deserialize(minisketch* sketch, const unsigned char* input);
104104
* If the element to be added is 0 (after potentially dropping the most significant
105105
* bits), then this function is a no-op. Sketches cannot contain an element with
106106
* the value 0.
107+
*
108+
* Note that adding the same element a second time removes it again.
107109
*/
108110
void minisketch_add_uint64(minisketch* sketch, uint64_t element);
109111

@@ -246,7 +248,7 @@ class Minisketch
246248
return *this;
247249
}
248250

249-
/** See miniksetch_add_element(). */
251+
/** See minisketch_add_uint64(). */
250252
Minisketch& Add(uint64_t element) noexcept
251253
{
252254
minisketch_add_uint64(m_minisketch.get(), element);

0 commit comments

Comments
 (0)