submarine swap: add comment to explain witness script asymmetry
This commit is contained in:
@@ -47,6 +47,14 @@ WITNESS_TEMPLATE_SWAP = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# The script of the reverse swaps has one extra check in it to verify
|
||||||
|
# that the length of the preimage is 32. This is required because in
|
||||||
|
# the reverse swaps the preimage is generated by the user and to
|
||||||
|
# settle the hold invoice, you need a preimage with 32 bytes . If that
|
||||||
|
# check wasn't there the user could generate a preimage with a
|
||||||
|
# different length which would still allow for claiming the onchain
|
||||||
|
# coins but the invoice couldn't be settled
|
||||||
|
|
||||||
WITNESS_TEMPLATE_REVERSE_SWAP = [
|
WITNESS_TEMPLATE_REVERSE_SWAP = [
|
||||||
opcodes.OP_SIZE,
|
opcodes.OP_SIZE,
|
||||||
OPPushDataGeneric(None),
|
OPPushDataGeneric(None),
|
||||||
|
|||||||
Reference in New Issue
Block a user