Skip to content

Commit 7cd6019

Browse files
committed
Merge rust-bitcoin#4964: bip158: Return no match for empty query
e7d992a bip158: Return no match for empty query (rustaceanrob) Pull request description: Perhaps this is up for debate, but considering the use case of checking for inclusions in a block, an empty query should not return `true` for any element, as no elements exist in the query. If the user happens to have no scripts to query for whatever reason, they will think every block is relevant. ACKs for top commit: apoelstra: ACK e7d992a; successfully ran local tests tcharding: ACK e7d992a Tree-SHA512: a67b40d315edbd5bfdd569558fdf2259717a00772b607a663cd77ae86d1af0a302d74c629c438a0aae5f8227fbd9ddb838fdb0c969afabd9ac90e638dd6d2f10
2 parents a0cb9bf + e7d992a commit 7cd6019

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin/src/bip158.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl GcsFilterReader {
306306
// sort
307307
mapped.sort_unstable();
308308
if mapped.is_empty() {
309-
return Ok(true);
309+
return Ok(false);
310310
}
311311
if n_elements == 0 {
312312
return Ok(false);

0 commit comments

Comments
 (0)