mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
protocol fix: use locktime from *other* side.
Which emerged clearly when setting one side's locktime differently than the other. Each side specifies the (minimum) time they need to notice a fraud attempt: this constrains the *other* side. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -61,7 +61,8 @@ B_FINALKEY=`getprivkey $B_FINALADDR`
|
||||
|
||||
# Both sides say what they want from channel
|
||||
$PREFIX ./open-channel $A_SEED $A_AMOUNT $A_CHANGEPUBKEY $A_TMPKEY $A_FINALKEY $A_TXIN > A-open.pb
|
||||
$PREFIX ./open-channel $B_SEED $B_AMOUNT $B_CHANGEPUBKEY $B_TMPKEY $B_FINALKEY $B_TXIN > B-open.pb
|
||||
# B asks for a (dangerously) short locktime, for testing unilateral close.
|
||||
$PREFIX ./open-channel --locktime=60 $B_SEED $B_AMOUNT $B_CHANGEPUBKEY $B_TMPKEY $B_FINALKEY $B_TXIN > B-open.pb
|
||||
|
||||
# Now sign anchor.
|
||||
$PREFIX ./open-anchor-scriptsigs A-open.pb B-open.pb $A_TXINKEY > A-anchor-scriptsigs.pb
|
||||
|
||||
Reference in New Issue
Block a user