-
Notifications
You must be signed in to change notification settings - Fork 178
Closed
Description
The following code checks the bounds of each Winternitz digit:
Line 132 in ce1391e
| OP_VERIFY |
This full check doesn't seem to be required. If the digit is negative, then OP_PICK will fail.
Therefore the following code could be replaced:
OP_DUP
0
{ D + 1 }
OP_WITHIN
OP_VERIFY
by
OP_DUP
{ D + 1 }
OP_LESSTHAN
OP_VERIFY
If we don't care about digit uniqueness, we can reduce the size further and just limit it to D:
{ D }
OP_MIN
3 opcodes are saved.
Am I missing something?
Metadata
Metadata
Assignees
Labels
No labels