예제 #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());
 }
예제 #2
0
 /**
  * @param Peer $peer
  * @param Tx $tx
  */
 public function onTx(Peer $peer, Tx $tx)
 {
     $this->emit('tx', [$tx->getTransaction()]);
 }