-
Notifications
You must be signed in to change notification settings - Fork 649
Open
Assignees
@dgpv
Description
python-bitcoinlib/bitcoin/core/script.py
Lines 692 to 694 in 173a73e
def witness_version(self):
"""Returns the witness version on [0,16]. """
return next(iter(self))
Because the witness version is actually a 'small int' opcode - that is, for witness version 1, without decode_op_n(), the returned value will be 0x51. It worked for version 0 because 'small int' opcode is decoded as 0 --> 0; 0x51..0x60 --> 1..16
Metadata
Metadata
Assignees
Labels
No labels