jimmysong / programmingbitcoin

Repository for the book
Other
1.75k stars 656 forks source link

Chapter 8, Exercise 5 Error #250

Open vvronskyFX opened 2 years ago

vvronskyFX commented 2 years ago

Working on Exercise 5 in Chapter 8, I'm trying to get through to the solution of verifying p2sh transaction.

I've modified sig_hash and verify_input. I also matched up to what was in the solution.

You'll see my code + output and then I share the book's solution code.

my def sig_hash ... code:

image

my def verify_input ... code:

image

My output after running the cell:

image

My attempt at de-bugging:

It says "NotImplementedError" there and I'm not sure where it's getting that. I looked in my "op.py" file and go to error line 719. Seems like the code is hitting this block: image

But I still can't see what could be the issue.

Now the Book's Solution code:

image

I've been working on this for a couple days to no avail. Has anyone successfully worked through this portion? If so, what did you do to achieve a solution here for an "OK" to pass?