Commit Graph
3 Commits
Author SHA1 Message Date
Dmitry Petukhov db8d6d426f fix docstring in taproot_output_script
the final "-None" line in the docstring of `taproot_output_script` example function was actually outside of the docstring
2019-11-05 02:13:24 +05:00
Dmitry Petukhov 12d8d5baa8 use bytes() instead of b'' - avoid markdown issue
Currently github markdown renders `b''` inside `<source>` tags incorrectly. This makes `h = b''` show as `h = b` and creates some confusion.
The issue can be avoided by using bytes() to create empty byte array
2019-11-04 19:15:12 +05:00
Dmitry Petukhov 0c49346c87 taproot_output_script: first returned byte should be OP_1 (0x51)
If we look at

  def IsPayToTaproot(script):
      return len(script) == 35 and script[0] == OP_1 and script[1] == 33 and script[2] >= 0 and script[2] <= 1

First byte is is checked for OP_1. OP_1 is 0x51

But the example code in this BIP returns  

`bytes([0x01, 0x21, output_pubkey[0] & 1]) + output_pubkey[1:]`

First byte 0x01, but it should be 0x51
2019-05-10 03:09:54 +05:00