solana/core
behzad nouri d6ec03f13c
patches default impl for crds filter (#12199)
In CrdsFilter.mask all bits after mask_bits are set to 1:
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L65
However the default implementation, sets both mask and mask_bits to zero
which is inconsistent with CrdsFilter::compute_mask for a mask_bits of
zero.

This commit changes the default implementation by setting mask to
`!0u64` (i.e all bits set to one). As a result, for the default crds
filter, `test_mask` will always return true, whereas previously it was
always returning false.
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L85

This is only used in tests and benchmarks, but causes some benchmarks to
be misleading by short circuiting in this line:
https://github.com/solana-labs/solana/blob/555252f4/core/src/crds_gossip_pull.rs#L429
2020-09-13 13:08:25 +00:00
..
benches uses rust intrinsics to convert hashes to u64 (#12097) 2020-09-09 15:28:17 +00:00
src patches default impl for crds filter (#12199) 2020-09-13 13:08:25 +00:00
tests Rename to ClusterType and restore devnet compat. (#12068) 2020-09-08 23:55:09 +09:00
.gitignore tmp dirs target to farf (#5079) 2019-07-12 18:28:42 -07:00
Cargo.toml uses rust intrinsics to convert hashes to u64 (#12097) 2020-09-09 15:28:17 +00:00
build.rs Introduce automatic ABI maintenance mechanism (2/2; rollout) (#8012) 2020-07-06 20:22:23 +09:00