From 1e79ad7236b0ba5273de02088b332f9392e2f727 Mon Sep 17 00:00:00 2001 From: Joseph Poon Date: Tue, 29 Dec 2015 05:43:07 -0800 Subject: [PATCH] Minor note --- lnwire/ESCROWED_HTLC_NOTES | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lnwire/ESCROWED_HTLC_NOTES b/lnwire/ESCROWED_HTLC_NOTES index 2beb510f..10c52d4b 100644 --- a/lnwire/ESCROWED_HTLC_NOTES +++ b/lnwire/ESCROWED_HTLC_NOTES @@ -101,5 +101,20 @@ Immediately refundable payments (2-of-3 can immediately cancel a payment) are also possible but requires another payment in the opposite direction with the R-value hashed twice (the R value becomes the H), but that's kind of annoying to write... it's easier to just assume immediate refund can only occur if both -buyer+seller agree to cancel the payment immediately (otherwise it will wait -until the timeout). +Recipient+Sender agree to cancel the payment immediately (otherwise it will +wait until the timeout). + +Also: THE ABOVE SCRIPT IS NOT THE MOST EFFICIENT SCRIPT POSSIBLE FOR THIS USE +CASE!!! This is to illustrate a similar conceptual use as current 2-of-3 +multisig. Realistically, you want to do *OR* + since the recipient will always redeem if they can. So the +hash code block would be instead: + OP_HASH160 OP_EQUAL + //Stack: <0> + OP_SWAP + //Stack: <0> + OP_HASH160 OP_EQUAL + //Stack: + OP_BOOLOR + //Stack: + OP_VERIFY