Airship\Cabin\Bridge\Blueprint\ChannelUpdates::getMerkleTree PHP Méthode

getMerkleTree() protected méthode

Get the current Merkle tree for our active channel.
protected getMerkleTree ( ) : MerkleTree
Résultat MerkleTree
    protected function getMerkleTree() : MerkleTree
    {
        $nodeList = [];
        $queryString = 'SELECT data FROM airship_tree_updates WHERE channel = ? ORDER BY treeupdateid ASC';
        foreach ($this->db->run($queryString, $this->channel) as $node) {
            $nodeList[] = new Node($node['data']);
        }
        return (new MerkleTree(...$nodeList))->setHashSize(\Sodium\CRYPTO_GENERICHASH_BYTES_MAX)->setPersonalizationString(\AIRSHIP_BLAKE2B_PERSONALIZATION);
    }