public function __construct(NodeInterface $node, Container $container) { $this->db = $container['db']; $this->retargetDb = new RetargetDb($this->db->getPdo()); $this->math = Bitcoin::getMath(); $this->consensus = new Consensus(Bitcoin::getMath(), new Params(Bitcoin::getMath())); $node->chains()->on('retarget', [$this, 'onRetarget']); }
/** * @return \PDO */ public function getPdo() { echo __FUNCTION__ . PHP_EOL; return $this->db->getPdo(); }