Example #1
0
 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']);
 }
Example #2
0
 /**
  * @return \PDO
  */
 public function getPdo()
 {
     echo __FUNCTION__ . PHP_EOL;
     return $this->db->getPdo();
 }