mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
doc: document HTLC 2drop optimization.
We can save an opcode in both HTLC send and receive scripts by using OP_2DROP instead of OP_DROP twice. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
08ae4a687d
commit
88ca0c91d9
@ -1906,11 +1906,7 @@ OP_ELSE Must be A, after HTLC has timed out.
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
OP_CHECKLOCKTIMEVERIFY
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
OP_DROP Ensure (absolute) time has passed.
|
||||
OP_CHECKLOCKTIMEVERIFY Ensure (absolute) time has passed.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
@ -1918,11 +1914,12 @@ OP_DROP Ensure (absolute) time has passed.
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
OP_CHECKSEQUENCEVERIFY
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
OP_CHECKSEQUENCEVERIFY Delay gives B enough time to use revocation if it
|
||||
has it.
|
||||
\end_layout
|
||||
|
||||
OP_DROP Delay gives B enough time to use revocation if it has it.
|
||||
\begin_layout Description
|
||||
OP_2DROP Drop the delay and htlc-timeout from the stack.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
@ -1963,20 +1960,17 @@ OP_IF
|
||||
\end_layout
|
||||
|
||||
\begin_deeper
|
||||
\begin_layout Description
|
||||
OP_DROP Remove extra hash
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
<DELAY>
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
|
||||
OP_CHECKSEQUENCEVERIFY
|
||||
\begin_inset space ~
|
||||
\end_inset
|
||||
OP_CHECKSEQUENCEVERIFY Delay gives A enough time to use revocation if it
|
||||
has it.
|
||||
\end_layout
|
||||
|
||||
OP_DROP Delay gives A enough time to use revocation if it has it.
|
||||
\begin_layout Description
|
||||
OP_2DROP Drop extra hash and delay from the stack
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user