diff --git a/2. Reading Version Messages/Lesson.ipynb b/2. Reading Version Messages/Lesson.ipynb index c3593d7..6e28e09 100644 --- a/2. Reading Version Messages/Lesson.ipynb +++ b/2. Reading Version Messages/Lesson.ipynb @@ -898,7 +898,7 @@ "def test_bytes_to_bool():\n", " assert bytes_to_bool(b'\\x00') is False,\\\n", " f'bytes_to_bool(b\"\\x00\") should return False'\n", - " assert bytes_to_bool(b'\\x00') is False,\\\n", + " assert bytes_to_bool(b'\\x01') is True,\\\n", " f'bytes_to_bool(b\"\\x01\") should return True'\n", " print('Tests passed!')\n", " \n", @@ -928,7 +928,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Exercise: Use `bytes_to_bool` to the interpret the `relay` bytes in `read_version_payload`" + "### Exercise: Use `bytes_to_bool` to interpret the `relay` bytes in `read_version_payload`" ] }, { @@ -1187,7 +1187,7 @@ "\n", "But this begs a question: with all this extra space, how should we represent a 4-byte IPv4 address?\n", "\n", - "As the network address table above describes, Satoshi employed an IPv4-mapped IPv4 address. This just means that he stuck a 12 byte prefix on the left side: `b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff'`, right the rightmost 4 bytes represent the IPv4 address." + "As the network address table above describes, Satoshi employed an IPv4-mapped IPv4 address. This just means that he stuck a 12 byte prefix on the left side: `b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff'`, the rightmost 4 bytes represent the IPv4 address." ] }, { @@ -1272,7 +1272,7 @@ "metadata": {}, "outputs": [], "source": [ - "# socket.AF_INET is the IPv6 address family\n", + "# socket.AF_INET6 is the IPv6 address family\n", "# Notice how it does some compacting of empty parts for us ...\n", "socket.inet_ntop(socket.AF_INET6, ipv6_bytes)" ]