diff --git a/1. Message Structure/Lesson.ipynb b/1. Message Structure/Lesson.ipynb index 71b685a..efbea58 100644 --- a/1. Message Structure/Lesson.ipynb +++ b/1. Message Structure/Lesson.ipynb @@ -415,7 +415,9 @@ "Now how should we deal with these magic bytes in the process of reading and interpreting real Bitcoin network messages? This one is pretty simple -- just check whether they're equal to the values in the wiki / reference implementation!\n", "\n", "![image](../images/magic-values.png)\n", - "##### Exercise 2: Check Network Magic" + "##### Exercise 2: Check Network Magic", + "\n", + "Try and fix the code below to get all the tests to pass:\n" ] }, { @@ -427,7 +429,7 @@ "NETWORK_MAGIC = b'\\xf9\\xbe\\xb4\\xd9'\n", "\n", "def read_magic(stream):\n", - " raise NotImplementedError()\n", + " raise ImplementMeToMakeItWork() # What does this line need to be replaced with? \n", "\n", "def is_mainnet_msg(stream):\n", " magic = read_magic(stream)\n", @@ -581,7 +583,7 @@ "outputs": [], "source": [ "def read_length(stream):\n", - " raise NotImplementedError()" + " raise NotImplementedError() # Fix me!" ] }, { @@ -726,8 +728,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Where Bitcoin uses SHA256, it usually uses it twice. [Here's a discussion](https://bitcoin.stackexchange.com/questions/6037/why-are-hashes-in-the-bitcoin-protocol-typically-computed-twice-double-computed) of why Satoshi might have made this decision \n", - "\n", "##### Exercise 8: Write a `compute_checksum` function which returns the first four bytes of \"double-sha256\"" ] }, @@ -782,7 +782,7 @@ "\n", "print(\"Payload: \", payload)\n", "\n", - "print(\"checksum == compute_checksum(payload)?: \", \n", + "print(\"Is the received checksum the same as the computed checksum?: \", \n", " checksum == compute_checksum(payload))" ] },