Exemple #1
0
 public function testTx()
 {
     list($hex, $tx) = $this->getTestTx();
     $txMsg = new Tx($tx);
     $this->assertEquals('tx', $txMsg->getNetworkCommand());
     $this->assertEquals($tx, $txMsg->getTransaction());
     $this->assertEquals($hex, $txMsg->getBuffer()->getHex());
 }
 /**
  * @param Peer $peer
  * @param Tx $tx
  */
 public function onTx(Peer $peer, Tx $tx)
 {
     $this->emit('tx', [$tx->getTransaction()]);
 }