예제 #1
0
        public void ProcessMessage(PeerConnection peer, MineralMessage message)
        {
            InventoryMessage inventory_message = (InventoryMessage)message;
            InventoryType    type = inventory_message.InventoryType;

            if (!Check(peer, inventory_message))
            {
                return;
            }

            foreach (SHA256Hash id in inventory_message.GetHashList())
            {
                Item item = new Item(id, type);
                peer.AddInventoryReceive(item, Helper.CurrentTimeMillis());
                Manager.Instance.AdvanceService.AddInventory(item);
            }
        }