lightning-docs icon indicating copy to clipboard operation
lightning-docs copied to clipboard

scriptSig elements order in HTLC success tx

Open hieblmi opened this issue 3 years ago • 1 comments

I am trying to understand why the order of elements in the scriptSig of the HTLC success transaction is the following(remotePub|localPub|preimage):

image

although the HTLC output locking script expects the order remotePub|preimage|localPub:

image

What am I missing?

hieblmi avatar Dec 02 '22 19:12 hieblmi

checkmultisig checks signatures in the same order as the supplied pubkeys, like so: 0 remotesig localsig 2 remotekey localkey 2 checkmultisig

antonilol avatar Dec 02 '22 19:12 antonilol