mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
submarine swap: add comment to explain witness script asymmetry
This commit is contained in:
parent
08f70420e3
commit
edc593a886
1 changed files with 8 additions and 0 deletions
|
@ -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 = [
|
||||
opcodes.OP_SIZE,
|
||||
OPPushDataGeneric(None),
|
||||
|
|
Loading…
Add table
Reference in a new issue