Skip to content

Commit

Permalink
feat: add test for bloom
Browse files Browse the repository at this point in the history
  • Loading branch information
sanghren committed Sep 9, 2023
1 parent baf2923 commit 1fea689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/network/src/p2p/gossip/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ impl Gossipable for TestTx {

proptest! {
#![proptest_config(ProptestConfig {
cases: 100,
cases: 100, // Need 100 successful test cases
.. ProptestConfig::default()
})]

#[test]
fn test_bloom_filter_refresh(
false_positive_probability in 0.0..1.0f64,
txs in proptest::collection::vec(any::<[u8; 32]>(), 0..100)
txs in proptest::collection::vec(any::<[u8; 32]>(), 0..100) // Will populate txs with 0 to 100 [u8; 32]
) {
let mut bloom_filter = Bloom::new_bloom_filter(10, 0.01);
let mut expected = vec![];
Expand Down

0 comments on commit 1fea689

Please sign in to comment.