Post
Topic
Board Development & Technical Discussion
Re: Using Pycoin to spend non-standard scripts
by
d4n13
on 20/07/2015, 09:39:45 UTC
How would I go about tweaking this code to avoid the manual addition of push20?


ie. I want to use
Code:
mk_script(['76', 'a9', 'dd6cce9f255a8cc17bda8ba0373df8e861cb866e', '88', 'ac'])
... instead of
Code:
mk_script(['76', 'a9', '14', 'dd6cce9f255a8cc17bda8ba0373df8e861cb866e', '88', 'ac'])
(note the "14"  preceding the pubkeyhash, which acts as push 20 bytes).

I'd prefer to avoid using the push bytes
Yeah, the bit about push20 is clean... no bug.  The fact that you have a list item of 40 hex digits is proof that deserialize consumed a push20.  If it consumed a push10 you would have a list item of 20 hex digits instead..

get it?