/** * @param TransactionInterface $coinbase * @param \GMP $nFees * @param int $height * @return $this */ public function checkCoinbaseSubsidy(TransactionInterface $coinbase, \GMP $nFees, $height) { $subsidy = gmp_init($this->consensus->getSubsidy($height), 10); $nBlockReward = $this->math->add($subsidy, $nFees); if ($this->math->cmp(gmp_init($coinbase->getValueOut(), 10), $nBlockReward) > 0) { throw new \RuntimeException('Accept(): Coinbase pays too much'); } return $this; }