Exemple #1
0
 /**
  * @param BlockIndexInterface $index
  */
 public function next(BlockIndexInterface $index)
 {
     if (!$this->index->isNext($index)) {
         throw new \InvalidArgumentException('Provided Index does not elongate this Chain');
     }
     $this->index = $index;
     $this->emit('tip', [$index]);
 }
Exemple #2
0
 /**
  * @param BlockIndexInterface $index
  * @return bool
  */
 public function isNext(BlockIndexInterface $index)
 {
     return $this->index->isNext($index);
 }