void RequestLastBlock(EndPoint address = null) { var message = new RequestBlocksMessage(new List <string>()); if (address != null) { net.SendMessageToPeer(message, address); } else { net.SendMessageToAllPeers(message); } }
private void RequestBlock(string hash, EndPoint peerAddress = null) { var list = new List <string>(); list.Add(hash); var message = new RequestBlocksMessage(list); if (peerAddress == null) { net.SendMessageToAllPeers(message); } else { net.SendMessageToPeer(message, peerAddress); } }