/** * @param BloomFilter $filter * @return FilteredBlock */ public function filter(BloomFilter $filter) { $vMatch = []; $vHashes = []; foreach ($this->getTransactions() as $tx) { $vMatch[] = $filter->isRelevantAndUpdate($tx); $vHashes[] = $tx->getTxHash(); } return new FilteredBlock($this->getHeader(), PartialMerkleTree::create(count($this->getTransactions()), $vHashes, $vMatch)); }