add doc that should have been copy-pasta'd from bench (#3389)

This commit is contained in:
Rob Walker 2019-03-20 11:10:42 -07:00 committed by GitHub
parent df9fd2bc0b
commit 3048de18bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@ struct Status<T> {
}
impl<T: Clone> Status<T> {
// new needs to be called once per second to be useful for the Bank
// 1M TPS * 1s (length of block in sigs) == 1M items in filter
// 1.0E-8 false positive rate
// https://hur.st/bloomfilter/?n=1000000&p=1.0E-8&m=&k=
fn new(blockhash: &Hash) -> Self {
let keys = (0..27).map(|i| blockhash.hash_at_index(i)).collect();
Status {