Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 2. Reading Version Messages/Lesson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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`"
]
},
{
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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)"
]
Expand Down