public void NodeDiscovered(string node) { byte[] decoded = Utils.DecodeBase58StringChecked(node.Substring(1)); if (decoded == null) { return; } MemoryStream ms = new MemoryStream(decoded); BinaryReader br = new BinaryReader(ms); byte[] addrBytes = br.ReadBytes(4); string address = ""; for (int i = 0; i < 4; i++) { //byte b = addrBytes[3 - i]; byte b = addrBytes[i]; address += b.ToString(); if (i < 3) { address += "."; } } ushort port = Utils.Byteswap(br.ReadUInt16()); AddNode(address, port); br.Close(); }