| 59 | } |
| 60 | |
| 61 | void CBloomFilter::insert(const vector<unsigned char>& vKey) |
| 62 | { |
| 63 | if (isFull) |
| 64 | return; |
| 65 | for (unsigned int i = 0; i < nHashFuncs; i++) |
| 66 | { |
| 67 | unsigned int nIndex = Hash(i, vKey); |
| 68 | // Sets bit nIndex of vData |
| 69 | vData[nIndex >> 3] |= (1 << (7 & nIndex)); |
| 70 | } |
| 71 | isEmpty = false; |
| 72 | } |
| 73 | |
| 74 | void CBloomFilter::insert(const COutPoint& outpoint) |
| 75 | { |