added assert checking bloom index size

This commit is contained in:
debris 2016-02-22 15:14:35 +01:00
parent 5e27e1b9aa
commit 4b69b96f9b

View File

@ -663,6 +663,7 @@ impl BlockChain {
let mut blocks_blooms = acc let mut blocks_blooms = acc
.entry(location.hash.clone()) .entry(location.hash.clone())
.or_insert_with(|| self.blocks_blooms(&location.hash).unwrap_or_else(BlocksBlooms::new)); .or_insert_with(|| self.blocks_blooms(&location.hash).unwrap_or_else(BlocksBlooms::new));
assert_eq!(self.bloom_indexer.index_size, blocks_blooms.blooms.len());
blocks_blooms.blooms[location.index] = bloom; blocks_blooms.blooms[location.index] = bloom;
} }
acc acc