From 2012f17a840ae9c2d723bdd3291b91a38cf1be4d Mon Sep 17 00:00:00 2001 From: Jonathan Erlich <35579235+joerlop@users.noreply.github.com> Date: Thu, 14 Nov 2019 15:53:51 -0500 Subject: [PATCH] Update raw_serialize method In the first if statement when cmd is not an opcode, the comparison operator should be <= because if length is 75 it should get into the if statement. --- code-ch05/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-ch05/script.py b/code-ch05/script.py index 8e8d42a2..9c80481f 100644 --- a/code-ch05/script.py +++ b/code-ch05/script.py @@ -95,7 +95,7 @@ def raw_serialize(self): # get the length in bytes length = len(cmd) # for large lengths, we have to use a pushdata opcode - if length < 75: + if length <= 75: # turn the length into a single byte integer result += int_to_little_endian(length, 1) elif length > 75 and length < 0x100: