Example #1
0
 /**
  * @return int|string
  */
 public function count()
 {
     return $this->segment->getLast()->getHeight();
 }
Example #2
0
 /**
  * @param ChainSegment $segment
  * @return ChainSegment[]
  */
 public function getHeights(ChainSegment $segment)
 {
     return $this->heightStorage[$segment->getId()];
 }
 /**
  * @param ChainSegment $a
  * @param ChainSegment $b
  * @return int
  */
 public function __invoke(ChainSegment $a, ChainSegment $b)
 {
     return $this->math->cmp(gmp_init($a->getLast()->getWork(), 10), gmp_init($b->getLast()->getWork(), 10));
 }