mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
test/test_protocol: add actual crossover case.
Not just add-htlc crossing over, but all the commit stages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
27
test/commits/11-commits-crossover.script
Normal file
27
test/commits/11-commits-crossover.script
Normal file
@@ -0,0 +1,27 @@
|
||||
# Commits which cross over still get resolved.
|
||||
A:offer 1
|
||||
B:offer 2
|
||||
A:commit
|
||||
B:commit
|
||||
|
||||
A:recvoffer
|
||||
B:recvoffer
|
||||
A:recvcommit
|
||||
B:recvcommit
|
||||
|
||||
A:recvrevoke
|
||||
B:recvrevoke
|
||||
|
||||
# They've got to come into sync eventually!
|
||||
A:commit
|
||||
B:commit
|
||||
A:recvcommit
|
||||
B:recvcommit
|
||||
A:recvrevoke
|
||||
B:recvrevoke
|
||||
|
||||
checksync
|
||||
echo ***A***
|
||||
A:dump
|
||||
echo ***B***
|
||||
B:dump
|
||||
22
test/commits/11-commits-crossover.script.expected
Normal file
22
test/commits/11-commits-crossover.script.expected
Normal file
@@ -0,0 +1,22 @@
|
||||
***A***
|
||||
LOCAL COMMITS:
|
||||
Commit 2:
|
||||
Offered htlcs: 1
|
||||
Received htlcs: 2
|
||||
SIGNED
|
||||
REMOTE COMMITS:
|
||||
Commit 2:
|
||||
Offered htlcs: 2
|
||||
Received htlcs: 1
|
||||
SIGNED
|
||||
***B***
|
||||
LOCAL COMMITS:
|
||||
Commit 2:
|
||||
Offered htlcs: 2
|
||||
Received htlcs: 1
|
||||
SIGNED
|
||||
REMOTE COMMITS:
|
||||
Commit 2:
|
||||
Offered htlcs: 1
|
||||
Received htlcs: 2
|
||||
SIGNED
|
||||
Reference in New Issue
Block a user