public function testNotFound() { $factory = new Factory(Bitcoin::getDefaultNetwork(), new Random()); $not = $factory->notfound([]); $this->assertEquals('notfound', $not->getNetworkCommand()); $this->assertEquals(0, count($not)); $empty = $not->getItems(); $this->assertEquals(0, count($empty)); $this->assertInternalType('array', $empty); $inv = new Inventory(Inventory::MSG_TX, Buffer::hex('4141414141414141414141414141414141414141414141414141414141414141')); $not = new NotFound([$inv]); $this->assertEquals(1, count($not)); $this->assertEquals($inv, $not->getItem(0)); }
/** * @param array $vInv */ public function notfound(array $vInv) { $this->send($this->msgs->notfound($vInv)); }