<commit_before><?php

namespace BitWasp\Bitcoin\Networking\P2P;

use BitWasp\Bitcoin\Networking\BlockLocator;
use BitWasp\Bitcoin\Chain\Headerchain;
use BitWasp\Bitcoin\Chain\Blockchain;
use BitWasp\Bitcoin\Networking\Messages\Inv;
use BitWasp\Bitcoin\Networking\Structure\NetworkAddress;

class Node
{
    /**
     * @var NetworkAddress
     */
    private $local;

    /**
     * @var Headerchain|Blockchain
     */
    private $chain;

    /**
     * @var PeerLocator
     */
    private $peers;

    /**
     * @param NetworkAddress $local
     * @param $chain
     * @param PeerLocator $peers
     */
    public function __construct(NetworkAddress $local, $chain, PeerLocator $peers)
    {
        $this->local = $local;
        $this->chain = $chain;
        $this->peers = $peers;
    }

    /**
     * @param bool $all
     * @return BlockLocator
     */
    public function locator($all = false)
    {
        return BlockLocator::create($this->chain()->currentHeight(), $this->chain()->index(), $all);
    }

    /**
     * @return PeerLocator
     */
    public function peers()
    {
        return $this->peers;
    }

    /**
     * @return Blockchain|Headerchain
     */
    public function chain()
    {
        return $this->chain;
    }

    /**
     * @param Peer $peer
     * @param Inv $vInv
     */
    public function processInv(Peer $peer, Inv $vInv)
    {
        $vDontHave = [];
        foreach ($vInv->getItems() as $vector) {
            $key = $vector->getHash()->getHex();
            if ($vector->isBlock()) {
                if (!$this->chain->index()->height()->contains($key)) {
                    $vDontHave[] = $vector;
                }
            } elseif ($vector->isTx()) {
            } elseif ($vector->isFilteredBlock()) {
                if (!$this->chain->index()->height()->contains($key)) {
                    $vDontHave[] = $vector;
                }
            }
        }

        if (count($vDontHave) > 0) {
            echo "send getdata\n";
            $peer->getdata($vDontHave);
        }
    }
}<commit_msg>Remove unused Node::processInv method<commit_after><?php

namespace BitWasp\Bitcoin\Networking\P2P;

use BitWasp\Bitcoin\Networking\BlockLocator;
use BitWasp\Bitcoin\Chain\Headerchain;
use BitWasp\Bitcoin\Chain\Blockchain;
use BitWasp\Bitcoin\Networking\Messages\Inv;
use BitWasp\Bitcoin\Networking\Structure\NetworkAddress;

class Node
{
    /**
     * @var NetworkAddress
     */
    private $local;

    /**
     * @var Headerchain|Blockchain
     */
    private $chain;

    /**
     * @var PeerLocator
     */
    private $peers;

    /**
     * @param NetworkAddress $local
     * @param $chain
     * @param PeerLocator $peers
     */
    public function __construct(NetworkAddress $local, $chain, PeerLocator $peers)
    {
        $this->local = $local;
        $this->chain = $chain;
        $this->peers = $peers;
    }

    /**
     * @param bool $all
     * @return BlockLocator
     */
    public function locator($all = false)
    {
        return BlockLocator::create($this->chain()->currentHeight(), $this->chain()->index(), $all);
    }

    /**
     * @return PeerLocator
     */
    public function peers()
    {
        return $this->peers;
    }

    /**
     * @return Blockchain|Headerchain
     */
    public function chain()
    {
        return $this->chain;
    }
}
{'fraction_non_alphanumeric': 0.1478726569473371, 'fraction_numerical': 0.0008925914906277894, 'mean_word_length': 2.004468275245755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4505168', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1043, 'n_words': 193}